1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -3008,12 +3008,12 @@ static int wpa_driver_nl80211_del_beacon
6 wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
12 nl80211_put_wiphy_data_ap(bss);
13 - msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON);
14 + msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_BEACON);
18 @@ -6100,7 +6100,7 @@ static void nl80211_teardown_ap(struct i
19 nl80211_mgmt_unsubscribe(bss, "AP teardown");
21 nl80211_put_wiphy_data_ap(bss);
22 - bss->flink->beacon_set = 0;
23 + wpa_driver_nl80211_del_beacon_all(bss);
27 @@ -8859,8 +8859,6 @@ static int wpa_driver_nl80211_if_remove(
29 wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
30 nl80211_teardown_ap(bss);
31 - if (!bss->added_if && !drv->first_bss->next)
32 - wpa_driver_nl80211_del_beacon_all(bss);
33 nl80211_destroy_bss(bss);
35 i802_set_iface_flags(bss, 0);