esp_hosted_ng: fix cmd_code in get/set reg domain
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 28 Aug 2023 06:58:53 +0000 (23:58 -0700)
committerBOT <bot@espressif.com>
Sat, 7 Oct 2023 05:25:48 +0000 (05:25 +0000)
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>
esp_hosted_ng/esp/esp_driver/network_adapter/main/cmd.c

index d081a84e8051fc90d346620f40e1818f4c37e4f5..5289b042a7e9b2452e049c6e0c7c90b54fc7dfe5 100644 (file)
@@ -953,7 +953,7 @@ int process_reg_set(uint8_t if_type, uint8_t *payload, uint16_t payload_len)
 
        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;
 
@@ -992,7 +992,7 @@ int process_reg_get(uint8_t if_type, uint8_t *payload, uint16_t payload_len)
 
        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;
 
This page took 0.029277 seconds and 4 git commands to generate.