diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 2d82412ed3..013dcf6ef8 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -6396,6 +6396,11 @@ static int drv_cmd_set_channel_switch(struct wlan_hdd_link_info *link_info, return -EINVAL; } + if (!qdf_atomic_test_bit(SOFTAP_BSS_STARTED, &link_info->link_flags)) { + hdd_err("SAP not started"); + return -EINVAL; + } + status = hdd_parse_set_channel_switch_command(value, &chan_number, &chan_bw); if (status) {