1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -2135,23 +2135,43 @@ wpa_driver_nl80211_finish_drv_init(struc
7 -static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv)
8 +static int wpa_driver_nl80211_del_bss_beacon(struct i802_bss *bss)
10 + struct wpa_driver_nl80211_data *drv = bss->drv;
13 + bss->beacon_set = 0;
19 genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
20 0, NL80211_CMD_DEL_BEACON, 0);
21 - NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
22 + NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
24 return send_and_recv_msgs(drv, msg, NULL, NULL);
30 +static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv)
32 + struct i802_bss *bss;
34 + for (bss = &drv->first_bss; bss; bss = bss->next)
35 + wpa_driver_nl80211_del_bss_beacon(bss);
40 +static int wpa_driver_nl80211_stop_ap(void *priv)
42 + struct i802_bss *bss = priv;
44 + return wpa_driver_nl80211_del_beacon(bss->drv);
48 * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
49 @@ -6658,4 +6678,5 @@ const struct wpa_driver_ops wpa_driver_n
50 .set_intra_bss = nl80211_set_intra_bss,
51 .set_param = nl80211_set_param,
52 .get_radio_name = nl80211_get_radio_name,
53 + .stop_ap = wpa_driver_nl80211_stop_ap,
55 --- a/src/drivers/driver.h
56 +++ b/src/drivers/driver.h
57 @@ -2253,6 +2253,8 @@ struct wpa_driver_ops {
58 * implementation, there is no need to implement this function.
60 int (*set_authmode)(void *priv, int authmode);
62 + int (*stop_ap)(void *priv);