/* Get the signal strength of the last packets received from an AP client.  */
sl_status_t sl_wfx_get_ap_client_signal_strength(const sl_wfx_mac_address_t *client, uint32_t *signal_strength)
/* Get the signal strength of the last packets received from an AP client.  */
sl_status_t sl_wfx_get_ap_client_signal_strength(const sl_wfx_mac_address_t *client, uint32_t *signal_strength)
{
  sl_status_t result;
  sl_wfx_get_ap_client_signal_strength_req_body_t payload;
  sl_wfx_get_ap_client_signal_strength_cnf_t *reply = NULL;
  memcpy(payload.mac, &client->octet, sizeof(payload.mac) );
  result = sl_wfx_send_command(SL_WFX_GET_AP_CLIENT_SIGNAL_STRENGTH_REQ_ID,
                               &payload,
                               sizeof(payload),
                               SL_WFX_SOFTAP_INTERFACE,
                               (sl_wfx_generic_confirmation_t **)&reply);
  if (result == SL_STATUS_OK) {
    result = sl_wfx_get_status_code(sl_wfx_htole32(reply->body.status), SL_WFX_GET_AP_CLIENT_SIGNAL_STRENGTH_REQ_ID);
    *signal_strength = sl_wfx_htole32(reply->body.rcpi);
  }
  return result;
}