]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix sending NL80211_CMD_DEL_BEACON command to wrong interface
authorNikita Chernikov <nchernikov@maxlinear.com>
Mon, 11 Mar 2024 16:58:21 +0000 (18:58 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 23 Mar 2024 20:08:15 +0000 (22:08 +0200)
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 <nchernikov@maxlinear.com>
src/drivers/driver_nl80211.c

index e2c46c123a2bd139ae231f81ee7d7db32826f715..92aaf2c3402b30ae49991ce85a1a575eaa39fa1b 100644 (file)
@@ -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;