WPS ER: Refresh ER data on WPS_ER_START when already started
This sends out the AP and Enrollee notifications for all tracked devices and generates a new SSDP search to find more APs.
This commit is contained in:
parent
7c009db2a6
commit
b3f371cabf
3 changed files with 17 additions and 1 deletions
|
@ -673,6 +673,7 @@ int wps_process_oob(struct wps_context *wps, struct oob_device_data *oob_dev,
|
|||
int wps_attr_text(struct wpabuf *data, char *buf, char *end);
|
||||
|
||||
struct wps_er * wps_er_init(struct wps_context *wps, const char *ifname);
|
||||
void wps_er_refresh(struct wps_er *er);
|
||||
void wps_er_deinit(struct wps_er *er);
|
||||
void wps_er_set_sel_reg(struct wps_er *er, int sel_reg, u16 dev_passwd_id,
|
||||
u16 sel_reg_config_methods);
|
||||
|
|
|
@ -1235,6 +1235,21 @@ wps_er_init(struct wps_context *wps, const char *ifname)
|
|||
}
|
||||
|
||||
|
||||
void wps_er_refresh(struct wps_er *er)
|
||||
{
|
||||
struct wps_er_ap *ap;
|
||||
struct wps_er_sta *sta;
|
||||
|
||||
for (ap = er->ap; ap; ap = ap->next) {
|
||||
wps_er_ap_event(er->wps, ap, WPS_EV_ER_AP_ADD);
|
||||
for (sta = ap->sta; sta; sta = sta->next)
|
||||
wps_er_sta_event(er->wps, sta, WPS_EV_ER_ENROLLEE_ADD);
|
||||
}
|
||||
|
||||
wps_er_send_ssdp_msearch(er);
|
||||
}
|
||||
|
||||
|
||||
void wps_er_deinit(struct wps_er *er)
|
||||
{
|
||||
if (er == NULL)
|
||||
|
|
|
@ -1124,7 +1124,7 @@ int wpas_wps_er_start(struct wpa_supplicant *wpa_s)
|
|||
{
|
||||
#ifdef CONFIG_WPS_ER
|
||||
if (wpa_s->wps_er) {
|
||||
/* TODO: re-send ctrl_iface events for current data? */
|
||||
wps_er_refresh(wpa_s->wps_er);
|
||||
return 0;
|
||||
}
|
||||
wpa_s->wps_er = wps_er_init(wpa_s->wps, wpa_s->ifname);
|
||||
|
|
Loading…
Reference in a new issue