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 <nchernikov@maxlinear.com>
This commit is contained in:
Nikita Chernikov 2024-03-11 18:58:21 +02:00 committed by Jouni Malinen
parent ec4b755b06
commit 9144f876a5

View file

@ -3078,12 +3078,12 @@ static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss,
return 0; return 0;
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)", wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
drv->ifindex); bss->ifindex);
link->beacon_set = 0; link->beacon_set = 0;
link->freq = 0; link->freq = 0;
nl80211_put_wiphy_data_ap(bss); 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) if (!msg)
return -ENOBUFS; return -ENOBUFS;