From: Nikita Chernikov Date: Mon, 11 Mar 2024 16:58:21 +0000 (+0200) Subject: nl80211: Fix sending NL80211_CMD_DEL_BEACON command to wrong interface X-Git-Tag: hostap_2_11~256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9144f876a56fafba55379e5adb3cb19e9c880e3e;p=thirdparty%2Fhostap.git nl80211: Fix sending NL80211_CMD_DEL_BEACON command to wrong interface The NL80211_CMD_DEL_BEACON command was always sent to the main interface of the radio instead of the desired BSS interface, e.g., when sending a STOP_AP control interface command from upper layer. Signed-off-by: Nikita Chernikov --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index e2c46c123..92aaf2c34 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -3078,12 +3078,12 @@ static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss, return 0; wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)", - drv->ifindex); + bss->ifindex); link->beacon_set = 0; link->freq = 0; 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); if (!msg) return -ENOBUFS;