Firmware side of esp_hosted_ng get/set reg domain commands uses 'cmd' to
set cmd->header.cmd_code which is incorrect. It should use cmd value
instead.
This field is not used by the host side, so the mismatch doesn't cause
any issues.
Fix it by using CMD_GET_REG_DOMAIN and CMD_SET_REG_DOMAIN respectively,
similarly to what other handlers do.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Kapil Gupta <kapil.gupta@espressif.com>
cmd = (struct cmd_reg_domain *)(buf_handle.payload);
esp_wifi_get_country_code(cmd->country_code);
- cmd->header.cmd_code = cmd;
+ cmd->header.cmd_code = CMD_SET_REG_DOMAIN;
cmd->header.len = 0;
cmd->header.cmd_status = CMD_RESPONSE_SUCCESS;
cmd = (struct cmd_reg_domain *)(buf_handle.payload);
esp_wifi_get_country_code(cmd->country_code);
- cmd->header.cmd_code = cmd;
+ cmd->header.cmd_code = CMD_GET_REG_DOMAIN;
cmd->header.len = 0;
cmd->header.cmd_status = CMD_RESPONSE_SUCCESS;