Skip to content

Commit

Permalink
nrf_wifi: Add a flag to indicate waiting for reg change event
Browse files Browse the repository at this point in the history
To determine if the regulatory change event is solicited or not, this
flag is handy.

Helps fix #79733.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Nov 10, 2024
1 parent d4b6895 commit 6539474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nrf_wifi/fw_if/umac_if/inc/fmac_structs_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 3 additions & 0 deletions nrf_wifi/fw_if/umac_if/src/fmac_api_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ enum nrf_wifi_status nrf_wifi_fmac_set_reg(struct nrf_wifi_fmac_dev_ctx *fmac_de
}

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));
Expand All @@ -849,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) {
Expand Down

0 comments on commit 6539474

Please sign in to comment.