From 99809c7a44e86918d08aa23d1666c99ccd22693a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 13 May 2020 17:09:52 +0300 Subject: [PATCH] nl80211: Disable offchannel-ok in AP mode only if beaconing When hostapd is started without beaconing (start_disabled=1), Public Action frame transmission command through nl80211 needs to allow offchannel operations regardless of the operating channel configuration. Signed-off-by: Jouni Malinen --- src/drivers/driver_nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 9c72341f9..0bedf0630 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -7755,7 +7755,8 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss, struct ieee80211_hdr *hdr; int offchanok = 1; - if (is_ap_interface(drv->nlmode) && (int) freq == bss->freq) + if (is_ap_interface(drv->nlmode) && (int) freq == bss->freq && + bss->beacon_set) offchanok = 0; wpa_printf(MSG_DEBUG, "nl80211: Send Action frame (ifindex=%d, "