123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- --- a/src/drivers/driver_nl80211.c
- +++ b/src/drivers/driver_nl80211.c
- @@ -2394,13 +2394,18 @@ wpa_driver_nl80211_finish_drv_init(struc
- }
-
-
- -static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv)
- +static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss)
- {
- + struct wpa_driver_nl80211_data *drv = bss->drv;
- struct nl_msg *msg;
-
- + if (!bss->beacon_set)
- + return 0;
- +
- + bss->beacon_set = 0;
- wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
- - drv->ifindex);
- - msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON);
- + bss->ifindex);
- + msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_BEACON);
- return send_and_recv_msgs(drv, msg, NULL, NULL);
- }
-
- @@ -2452,7 +2457,7 @@ static void wpa_driver_nl80211_deinit(st
- nl80211_remove_monitor_interface(drv);
-
- if (is_ap_interface(drv->nlmode))
- - wpa_driver_nl80211_del_beacon(drv);
- + wpa_driver_nl80211_del_beacon(bss);
-
- if (drv->eapol_sock >= 0) {
- eloop_unregister_read_sock(drv->eapol_sock);
- @@ -4385,8 +4390,7 @@ static void nl80211_teardown_ap(struct i
- nl80211_remove_monitor_interface(drv);
- else
- nl80211_mgmt_unsubscribe(bss, "AP teardown");
- -
- - bss->beacon_set = 0;
- + wpa_driver_nl80211_del_beacon(bss);
- }
-
-
- @@ -6387,8 +6391,6 @@ static int wpa_driver_nl80211_if_remove(
- } 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(drv);
- nl80211_destroy_bss(bss);
- if (!bss->added_if)
- i802_set_iface_flags(bss, 0);
- @@ -6750,8 +6752,7 @@ static int wpa_driver_nl80211_deinit_ap(
- struct wpa_driver_nl80211_data *drv = bss->drv;
- if (!is_ap_interface(drv->nlmode))
- return -1;
- - wpa_driver_nl80211_del_beacon(drv);
- - bss->beacon_set = 0;
- + wpa_driver_nl80211_del_beacon(bss);
-
- /*
- * If the P2P GO interface was dynamically added, then it is
- @@ -6770,8 +6771,7 @@ static int wpa_driver_nl80211_stop_ap(vo
- struct wpa_driver_nl80211_data *drv = bss->drv;
- if (!is_ap_interface(drv->nlmode))
- return -1;
- - wpa_driver_nl80211_del_beacon(drv);
- - bss->beacon_set = 0;
- + wpa_driver_nl80211_del_beacon(bss);
- return 0;
- }
-
|