nl80211: Do not stop AP mode Probe Request reporting on Listen stop

When nl80211_setup_ap() has enabled Probe Request reporting, this must
not be disabled when P2P Listen state is stopped to avoid breaking AP
mode operations. This could happen, e.g., if a Probe Request frame was
received from a P2P device that the we are trying to invite to our group
(i.e., when operating in GO role). p2p_probe_req_rx() calls
p2p_invite_start() in this case and that ends up calling
p2p->cfg->stop_listen() which calls probe_req_report() driver op.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2011-12-27 20:32:29 +02:00 committed by Jouni Malinen
parent d7e70476f2
commit 0d891981db

View file

@ -8058,7 +8058,16 @@ static int wpa_driver_nl80211_probe_req_report(void *priv, int report)
struct wpa_driver_nl80211_data *drv = bss->drv;
if (!report) {
if (bss->nl_preq) {
if (bss->nl_preq && drv->device_ap_sme &&
is_ap_interface(drv->nlmode)) {
/*
* Do not disable Probe Request reporting that was
* enabled in nl80211_setup_ap().
*/
wpa_printf(MSG_DEBUG, "nl80211: Skip disabling of "
"Probe Request reporting nl_preq=%p while "
"in AP mode", bss->nl_preq);
} else if (bss->nl_preq) {
wpa_printf(MSG_DEBUG, "nl80211: Disable Probe Request "
"reporting nl_preq=%p", bss->nl_preq);
eloop_unregister_read_sock(