1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -2532,22 +2532,41 @@ 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;
18 nl80211_cmd(drv, msg, 0, NL80211_CMD_DEL_BEACON);
19 - NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
20 + NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
22 return send_and_recv_msgs(drv, msg, NULL, NULL);
28 +static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv)
30 + struct i802_bss *bss;
32 + for (bss = &drv->first_bss; bss; bss = bss->next)
33 + wpa_driver_nl80211_del_bss_beacon(bss);
38 +static int wpa_driver_nl80211_stop_ap(void *priv)
40 + struct i802_bss *bss = priv;
42 + return wpa_driver_nl80211_del_beacon(bss->drv);
46 * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
47 @@ -7654,4 +7673,5 @@ const struct wpa_driver_ops wpa_driver_n
48 .send_tdls_mgmt = nl80211_send_tdls_mgmt,
49 .tdls_oper = nl80211_tdls_oper,
50 #endif /* CONFIG_TDLS */
51 + .stop_ap = wpa_driver_nl80211_stop_ap,
53 --- a/src/drivers/driver.h
54 +++ b/src/drivers/driver.h
55 @@ -2452,6 +2452,8 @@ struct wpa_driver_ops {
57 void (*poll_client)(void *priv, const u8 *own_addr,
58 const u8 *addr, int qos);
60 + int (*stop_ap)(void *priv);