src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc
zx_status_t SimFirmware::HandleEscanRequest(const brcmf_escan_params_le* escan_params,
                                            size_t params_len) {
  if (escan_params->version != BRCMF_ESCAN_REQ_VERSION) {
    BRCMF_DBG(SIM, "Mismatched escan version (expected %d, saw %d) - ignoring request\n",
              BRCMF_ESCAN_REQ_VERSION, escan_params->version);
    return ZX_ERR_NOT_SUPPORTED;
  }

  switch (escan_params->action) {
    case WL_ESCAN_ACTION_START:
      return EscanStart(escan_params->sync_id, &escan_params->params_le,
                        params_len - offsetof(brcmf_escan_params_le, params_le));
    case WL_ESCAN_ACTION_CONTINUE:
      ZX_ASSERT_MSG(0, "Unimplemented escan option WL_ESCAN_ACTION_CONTINUE\n");
      return ZX_ERR_NOT_SUPPORTED;
    case WL_ESCAN_ACTION_ABORT:
      ZX_ASSERT_MSG(0, "Unimplemented escan option WL_ESCAN_ACTION_ABORT\n");
      return ZX_ERR_NOT_SUPPORTED;
    default:
      ZX_ASSERT_MSG(0, "Unrecognized escan option %d\n", escan_params->action);
      return ZX_ERR_NOT_SUPPORTED;
  }

  return ZX_OK;
}
// Send an event to the firmware notifying them that the scan has completed.
Send an event to the firmware notifying them that the scan has completed.
Send an event to the firmware notifying them that the scan has completed .
zx_status_t SimFirmware::HandleEscanRequest(const brcmf_escan_params_le* escan_params,
                                            size_t params_len) {
  if (escan_params->version != BRCMF_ESCAN_REQ_VERSION) {
    BRCMF_DBG(SIM, "Mismatched escan version (expected %d, saw %d) - ignoring request\n",
              BRCMF_ESCAN_REQ_VERSION, escan_params->version);
    return ZX_ERR_NOT_SUPPORTED;
  }
  switch (escan_params->action) {
    case WL_ESCAN_ACTION_START:
      return EscanStart(escan_params->sync_id, &escan_params->params_le,
                        params_len - offsetof(brcmf_escan_params_le, params_le));
    case WL_ESCAN_ACTION_CONTINUE:
      ZX_ASSERT_MSG(0, "Unimplemented escan option WL_ESCAN_ACTION_CONTINUE\n");
      return ZX_ERR_NOT_SUPPORTED;
    case WL_ESCAN_ACTION_ABORT:
      ZX_ASSERT_MSG(0, "Unimplemented escan option WL_ESCAN_ACTION_ABORT\n");
      return ZX_ERR_NOT_SUPPORTED;
    default:
      ZX_ASSERT_MSG(0, "Unrecognized escan option %d\n", escan_params->action);
      return ZX_ERR_NOT_SUPPORTED;
  }
  return ZX_OK;
}
zx_status_t SimFirmware :: HandleEscanRequest ( const brcmf_escan_params_le * escan_params , size_t params_len ) { if ( escan_params -> version != BRCMF_ESCAN_REQ_VERSION ) { BRCMF_DBG ( SIM , " \n " , BRCMF_ESCAN_REQ_VERSION , escan_params -> version ) ; return ZX_ERR_NOT_SUPPORTED ; } switch ( escan_params -> action ) { case WL_ESCAN_ACTION_START : return EscanStart ( escan_params -> sync_id , & escan_params -> params_le , params_len - offsetof ( brcmf_escan_params_le , params_le ) ) ; case WL_ESCAN_ACTION_CONTINUE : ZX_ASSERT_MSG ( 0 , " \n " ) ; return ZX_ERR_NOT_SUPPORTED ; case WL_ESCAN_ACTION_ABORT : ZX_ASSERT_MSG ( 0 , " \n " ) ; return ZX_ERR_NOT_SUPPORTED ; default : ZX_ASSERT_MSG ( 0 , " \n " , escan_params -> action ) ; return ZX_ERR_NOT_SUPPORTED ; } return ZX_OK ; }
Send an event to the firmware notifying them that the scan has completed.
Send an event to the firmware notifying them that the scan has completed .