diff --git a/nrf_wifi/fw_if/umac_if/inc/fmac_structs_common.h b/nrf_wifi/fw_if/umac_if/inc/fmac_structs_common.h index b5222f9628..f357286916 100644 --- a/nrf_wifi/fw_if/umac_if/inc/fmac_structs_common.h +++ b/nrf_wifi/fw_if/umac_if/inc/fmac_structs_common.h @@ -170,6 +170,8 @@ struct nrf_wifi_fmac_dev_ctx { unsigned int reg_chan_count; /** Regulatory channel attributes */ struct nrf_wifi_get_reg_chn_info *reg_chan_info; + /** To determine if event is solicited or not */ + bool waiting_for_reg_event; /** Regulatory set status */ int reg_set_status; /** Regulatory change event */ diff --git a/nrf_wifi/fw_if/umac_if/src/fmac_api_common.c b/nrf_wifi/fw_if/umac_if/src/fmac_api_common.c index 2da71209cc..8c801cac45 100644 --- a/nrf_wifi/fw_if/umac_if/src/fmac_api_common.c +++ b/nrf_wifi/fw_if/umac_if/src/fmac_api_common.c @@ -824,6 +824,9 @@ enum nrf_wifi_status nrf_wifi_fmac_set_reg(struct nrf_wifi_fmac_dev_ctx *fmac_de set_reg_cmd->valid_fields |= NRF_WIFI_CMD_REQ_SET_REG_USER_REG_FORCE; } + fmac_dev_ctx->reg_set_status = false; + fmac_dev_ctx->waiting_for_reg_event = true; + status = umac_cmd_cfg(fmac_dev_ctx, set_reg_cmd, sizeof(*set_reg_cmd)); @@ -848,6 +851,7 @@ enum nrf_wifi_status nrf_wifi_fmac_set_reg(struct nrf_wifi_fmac_dev_ctx *fmac_de goto out; } + fmac_dev_ctx->waiting_for_reg_event = false; reg_change = fmac_dev_ctx->reg_change; if (reg_change->intr != exp_initiator) {