aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2015-06-10 08:43:35 (GMT)
committerJouni Malinen <j@w1.fi>2015-06-14 20:16:55 (GMT)
commit0799b3f89991033c3310c9e389693070d4311880 (patch)
treeb0a17e443ba7821cb702bf9fdce33cd13fbe7a3a /wpa_supplicant
parent5d180a77392690b141d95609d8c8692317712b4f (diff)
downloadhostap-0799b3f89991033c3310c9e389693070d4311880.zip
hostap-0799b3f89991033c3310c9e389693070d4311880.tar.gz
hostap-0799b3f89991033c3310c9e389693070d4311880.tar.bz2
P2P: Specify frequency when sending Probe Response frame
If the RX frequency of the Probe Request frame is known, specify it when sending the Probe Response frame. This is needed when the Probe Request frame is received on another virtual interface, for example, when a GO or P2PS client are discoverable on the group operating channel. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ap.c7
-rw-r--r--wpa_supplicant/driver_i.h6
-rw-r--r--wpa_supplicant/p2p_supplicant.c6
3 files changed, 14 insertions, 5 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 15192d1..f3960c5 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -485,8 +485,13 @@ static int ap_probe_req_rx(void *ctx, const u8 *sa, const u8 *da,
int ssi_signal)
{
struct wpa_supplicant *wpa_s = ctx;
+ unsigned int freq = 0;
+
+ if (wpa_s->ap_iface)
+ freq = wpa_s->ap_iface->freq;
+
return wpas_p2p_probe_req_rx(wpa_s, sa, da, bssid, ie, ie_len,
- 0, ssi_signal);
+ freq, ssi_signal);
}
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index b5b34c2..1fcb180 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -286,11 +286,13 @@ static inline int wpa_drv_set_country(struct wpa_supplicant *wpa_s,
}
static inline int wpa_drv_send_mlme(struct wpa_supplicant *wpa_s,
- const u8 *data, size_t data_len, int noack)
+ const u8 *data, size_t data_len, int noack,
+ unsigned int freq)
{
if (wpa_s->driver->send_mlme)
return wpa_s->driver->send_mlme(wpa_s->drv_priv,
- data, data_len, noack, 0);
+ data, data_len, noack,
+ freq);
return -1;
}
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a12ffb9..df7565f 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2397,10 +2397,12 @@ static void wpas_stop_listen(void *ctx)
}
-static int wpas_send_probe_resp(void *ctx, const struct wpabuf *buf)
+static int wpas_send_probe_resp(void *ctx, const struct wpabuf *buf,
+ unsigned int freq)
{
struct wpa_supplicant *wpa_s = ctx;
- return wpa_drv_send_mlme(wpa_s, wpabuf_head(buf), wpabuf_len(buf), 1);
+ return wpa_drv_send_mlme(wpa_s, wpabuf_head(buf), wpabuf_len(buf), 1,
+ freq);
}