1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -3075,12 +3075,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 @@ -6176,8 +6176,7 @@ static void nl80211_teardown_ap(struct i
19 nl80211_mgmt_unsubscribe(bss, "AP teardown");
21 nl80211_put_wiphy_data_ap(bss);
23 - bss->flink->beacon_set = 0;
24 + wpa_driver_nl80211_del_beacon_all(bss);
28 @@ -8977,8 +8976,6 @@ static int wpa_driver_nl80211_if_remove(
30 wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
31 nl80211_teardown_ap(bss);
32 - if (!bss->added_if && !drv->first_bss->next)
33 - wpa_driver_nl80211_del_beacon_all(bss);
34 nl80211_destroy_bss(bss);
36 i802_set_iface_flags(bss, 0);