Skip to content

Commit

Permalink
nrf_wifi: Improve error logging
Browse files Browse the repository at this point in the history
Log what is expected also.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Nov 15, 2023
1 parent 1125770 commit 38add2d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions nrf_wifi/fw_if/umac_if/src/fmac_api_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,31 @@ static int nrf_wifi_patch_version_compat(struct nrf_wifi_fmac_dev_ctx *fmac_dev_

if (family != RPU_FAMILY) {
nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv,
"Incompatible RPU version: %d", family);
"Incompatible RPU version: %d, expected: %d",
family, RPU_FAMILY);
return -1;
}

if (major != RPU_MAJOR_VERSION) {
nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv,
"Incompatible RPU major version: %d", major);
"Incompatible RPU major version: %d, expected: %d",
major, RPU_MAJOR_VERSION);
return -1;
}

/* TODO: Allow minor version to be different */
if (minor != RPU_MINOR_VERSION) {
nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv,
"Incompatible RPU minor version: %d", minor);
"Incompatible RPU minor version: %d, expected: %d",
minor, RPU_MINOR_VERSION);
return -1;
}

/* TODO: Allow patch version to be different */
if (patch != RPU_PATCH_VERSION) {
nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv,
"Incompatible RPU patch version: %d", patch);
"Incompatible RPU patch version: %d, expected: %d",
patch, RPU_PATCH_VERSION);
return -1;
}

Expand Down Expand Up @@ -123,7 +127,7 @@ enum nrf_wifi_status nrf_wifi_validate_fw_header(struct nrf_wifi_fmac_dev_ctx *f

if (nrf_wifi_patch_version_compat(fmac_dev_ctx, info->version) != 0) {
nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv,
"Incompatible patch version");
"Incompatible patch");
return NRF_WIFI_STATUS_FAIL;
}

Expand Down

0 comments on commit 38add2d

Please sign in to comment.