65 lines
2.0 KiB
Diff
65 lines
2.0 KiB
Diff
From c2031863a036db040f11a21b7093afb4e2322b91 Mon Sep 17 00:00:00 2001
|
|
From: Patrick Walther <patrick.walther@netmodule.com>
|
|
Date: Tue, 28 Jan 2020 15:14:35 +0100
|
|
|
|
---
|
|
src/drivers/driver_nl80211.c | 15 ++++++++-------
|
|
1 file changed, 8 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
|
index d0f79ca4b..0cdcca66f 100644
|
|
--- a/src/drivers/driver_nl80211.c
|
|
+++ b/src/drivers/driver_nl80211.c
|
|
@@ -2721,10 +2721,15 @@ static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss)
|
|
struct nl_msg *msg;
|
|
struct wpa_driver_nl80211_data *drv = bss->drv;
|
|
|
|
+ if (!bss->beacon_set)
|
|
+ return 0;
|
|
+
|
|
+ bss->beacon_set = 0;
|
|
+
|
|
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
|
|
- drv->ifindex);
|
|
+ bss->ifindex);
|
|
nl80211_put_wiphy_data_ap(bss);
|
|
- msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON);
|
|
+ msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_BEACON);
|
|
return send_and_recv_msgs(drv, msg, NULL, NULL);
|
|
}
|
|
|
|
@@ -5042,7 +5047,7 @@ static void nl80211_teardown_ap(struct i802_bss *bss)
|
|
nl80211_mgmt_unsubscribe(bss, "AP teardown");
|
|
|
|
nl80211_put_wiphy_data_ap(bss);
|
|
- bss->beacon_set = 0;
|
|
+ wpa_driver_nl80211_del_beacon(bss);
|
|
}
|
|
|
|
|
|
@@ -7353,8 +7358,6 @@ static int wpa_driver_nl80211_if_remove(struct i802_bss *bss,
|
|
} else {
|
|
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
|
|
nl80211_teardown_ap(bss);
|
|
- if (!bss->added_if && !drv->first_bss->next)
|
|
- wpa_driver_nl80211_del_beacon(bss);
|
|
nl80211_destroy_bss(bss);
|
|
if (!bss->added_if)
|
|
i802_set_iface_flags(bss, 0);
|
|
@@ -7744,7 +7747,6 @@ static int wpa_driver_nl80211_deinit_ap(void *priv)
|
|
if (!is_ap_interface(drv->nlmode))
|
|
return -1;
|
|
wpa_driver_nl80211_del_beacon(bss);
|
|
- bss->beacon_set = 0;
|
|
|
|
/*
|
|
* If the P2P GO interface was dynamically added, then it is
|
|
@@ -7764,7 +7766,6 @@ static int wpa_driver_nl80211_stop_ap(void *priv)
|
|
if (!is_ap_interface(drv->nlmode))
|
|
return -1;
|
|
wpa_driver_nl80211_del_beacon(bss);
|
|
- bss->beacon_set = 0;
|
|
return 0;
|
|
}
|
|
|