/* Compare the chip keyset and the firmware one to check compatibility.  */
static sl_status_t sl_wfx_compare_keysets(uint8_t chip_keyset, char *firmware_keyset)
/* Compare the chip keyset and the firmware one to check compatibility.  */
static sl_status_t sl_wfx_compare_keysets(uint8_t chip_keyset, char *firmware_keyset)
{
  sl_status_t result;
  char        keyset_string[3];
  uint8_t     keyset_value;
  keyset_string[0] = *(firmware_keyset + 6);
  keyset_string[1] = *(firmware_keyset + 7);
  keyset_string[2] = '\0';
  keyset_value     = (uint8_t)strtoul(keyset_string, NULL, 16);
  if (keyset_value == chip_keyset) {
    result = SL_STATUS_OK;
  } else {
    result = SL_STATUS_WIFI_INVALID_KEY;
  }
  return result;
}