DPP: Add driver operation for enabling/disabling listen mode
This can be used to configure RX filter to be able to receive broadcast DPP Public Action frames. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
99cf895553
commit
4d2ec436e3
3 changed files with 20 additions and 0 deletions
|
@ -4424,6 +4424,17 @@ struct wpa_driver_ops {
|
||||||
*/
|
*/
|
||||||
int (*update_dh_ie)(void *priv, const u8 *peer_mac, u16 reason_code,
|
int (*update_dh_ie)(void *priv, const u8 *peer_mac, u16 reason_code,
|
||||||
const u8 *ie, size_t ie_len);
|
const u8 *ie, size_t ie_len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dpp_listen - Notify driver about start/stop of DPP listen
|
||||||
|
* @priv: Private driver interface data
|
||||||
|
* @enable: Whether listen state is enabled (or disabled)
|
||||||
|
* Returns: 0 on success, -1 on failure
|
||||||
|
*
|
||||||
|
* This optional callback can be used to update RX frame filtering to
|
||||||
|
* explicitly allow reception of broadcast Public Action frames.
|
||||||
|
*/
|
||||||
|
int (*dpp_listen)(void *priv, bool enable);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -857,6 +857,7 @@ static void dpp_start_listen_cb(struct wpa_radio_work *work, int deinit)
|
||||||
}
|
}
|
||||||
wpa_s->off_channel_freq = 0;
|
wpa_s->off_channel_freq = 0;
|
||||||
wpa_s->roc_waiting_drv_freq = lwork->freq;
|
wpa_s->roc_waiting_drv_freq = lwork->freq;
|
||||||
|
wpa_drv_dpp_listen(wpa_s, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -931,6 +932,7 @@ void wpas_dpp_listen_stop(struct wpa_supplicant *wpa_s)
|
||||||
wpa_printf(MSG_DEBUG, "DPP: Stop listen on %u MHz",
|
wpa_printf(MSG_DEBUG, "DPP: Stop listen on %u MHz",
|
||||||
wpa_s->dpp_listen_freq);
|
wpa_s->dpp_listen_freq);
|
||||||
wpa_drv_cancel_remain_on_channel(wpa_s);
|
wpa_drv_cancel_remain_on_channel(wpa_s);
|
||||||
|
wpa_drv_dpp_listen(wpa_s, false);
|
||||||
wpa_s->dpp_listen_freq = 0;
|
wpa_s->dpp_listen_freq = 0;
|
||||||
wpas_dpp_listen_work_done(wpa_s);
|
wpas_dpp_listen_work_done(wpa_s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1108,4 +1108,11 @@ static inline int wpa_drv_set_4addr_mode(struct wpa_supplicant *wpa_s, int val)
|
||||||
wpa_s->bridge_ifname, val);
|
wpa_s->bridge_ifname, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int wpa_drv_dpp_listen(struct wpa_supplicant *wpa_s, bool enable)
|
||||||
|
{
|
||||||
|
if (!wpa_s->driver->dpp_listen)
|
||||||
|
return 0;
|
||||||
|
return wpa_s->driver->dpp_listen(wpa_s->drv_priv, enable);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* DRIVER_I_H */
|
#endif /* DRIVER_I_H */
|
||||||
|
|
Loading…
Reference in a new issue