class SimFirmware

Defined at line 85 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

Public Members

SimErrorInjector err_inj_

Public Methods

void SimFirmware (brcmf_simdev * simdev)

Defined at line 280 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t SetupIovarTable ()

Steps to add an iovar handler:

1. If the iovar corresponds to a member variable in SimFirmware, use the generic handlers,

IovarSet(), IovarGet() and set the size and address of the variable OR

if the iovar corresponds to a member in sim_iface_entry_t , use the generic handlers,

IovarIfaceVarSet(), IovarIfaceVarGet() and set the size and offset of the variable.

2. Or else define the handler function as SimFirmware::Iovar

<Name

>{Set, Get} in sim-fw.{h, cc}.

3. If the iovar exists in kIovarInfoTable: modify the corresponding entry by replacing the

nullptr with your new handler.

Defined at line 141 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t SetupInternalVmo ()

Defined at line 242 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void SimFirmware ()

Defined at line 301 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void ~SimFirmware ()

Defined at line 307 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

simulation::StationIfc * GetHardwareIfc ()

Defined at line 309 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void GetChipInfo (uint32_t * chip, uint32_t * chiprev)

Defined at line 311 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

int32_t GetPM ()

Defined at line 316 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void SetSuspendHook (fit::function<zx_status_t ()> suspend_hook)

Defined at line 329 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void SetResumeHook (fit::function<zx_status_t ()> resume_hook)

Defined at line 332 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void SetRecoveryHook (fit::function<void ()> recovery_hook)

Defined at line 335 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void SetCapabilityIovars (CapabilityIovars new_iovars)

Allow simulation to set CapabilityIovars

Defined at line 340 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void SetBssInfoOverride (const brcmf_bss_info_le & bss_info)

Defined at line 342 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void ClearBssInfoOverride ()

Defined at line 343 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void SetAssocRespIes (cpp20::span<const uint8_t> ies)

Defined at line 345 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void SetHighWmeRxErrorRate ()

Defined at line 382 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

void ClearHighWmeRxErrorRate ()

Defined at line 383 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.h

uint16_t GetNumClients (uint16_t ifidx)

Num of clients currently associated with the SoftAP IF

Defined at line 934 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void TriggerFirmwareDisassoc (wlan_ieee80211_wire::ReasonCode reason)

Defined at line 948 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void TriggerFirmwareDeauth (wlan_ieee80211_wire::ReasonCode reason)

Defined at line 952 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void TriggerFirmwareDisassocIndFromBssid (wlan_ieee80211_wire::ReasonCode reason, const uint8_t[6] bssid)

Allows simulation of a disassoc ind coming from an unexpected BSS.

Defined at line 956 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void TriggerFirmwareDeauthIndFromBssid (wlan_ieee80211_wire::ReasonCode reason, const uint8_t[6] bssid)

Allows simulation of a deauth ind coming from an unexpected BSS.

Defined at line 963 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void TriggerFirmwareReassocEvent (const common::MacAddr & bssid)

Send a spurious REASSOC attempt event.

Defined at line 970 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void TriggerFirmwareRoamEvent (const common::MacAddr & bssid)

Send a spurious ROAM NO_NETWORKS failure event.

Defined at line 975 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarsSet (uint16_t ifidx, const char * name, const void * value, size_t value_len, bcme_status_t * fw_err)

Firmware iovar accessors

Defined at line 2444 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarsGet (uint16_t ifidx, const char * name, void * value_out, size_t value_len, bcme_status_t * fw_err)

Defined at line 2482 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void convert_chanspec_to_channel (uint16_t chanspec, wlan_ieee80211_wire::WlanChannel * ch)

channel-chanspec helper functions

Defined at line 3712 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

uint16_t convert_channel_to_chanspec (wlan_ieee80211_wire::WlanChannel * channel)

Defined at line 3716 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusPreinit ()

Bus operations: calls from driver

Defined at line 318 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void BusStop ()

Defined at line 323 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusTxCtl (unsigned char * msg, uint len)

Process a TX CTL message. These have a BCDC header, followed by a payload that is determined

by the type of command.

Defined at line 388 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusTxFrameSingle (const wlan::drivers::components::Frame & frame)

Defined at line 824 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusTxFrames (cpp20::span<wlan::drivers::components::Frame> frames)

Defined at line 881 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusRxCtl (unsigned char * msg, uint len, int * rxlen_out)

Process an RX CTL message. We simply pass back the results of the previous TX CTL

operation, which has been stored in bcdc_response_. In real hardware, we may have to

indicate that the TX CTL operation has not completed. In simulated hardware, we perform

all operations synchronously.

This function is a simplified version of brcmf_sdio_bus_rxctl. As much of the

response `msg_` last stored by BcdcResponse::Set() is written to `data` as possible,

and the actual size of `msg_` is returned in `len_out`.

Defined at line 988 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusFlushTxQueue (int ifidx)

Defined at line 1001 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusGetBootloaderMacAddr (uint8_t * mac_addr)

Defined at line 1006 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusQueueRxSpace (cpp20::span<const fuchsia_hardware_network_driver::wire::RxSpaceBuffer> buffers, uint8_t *[] vmo_addrs)

Defined at line 1045 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

drivers::components::FrameContainer BusAcquireTxSpace (size_t count)

Defined at line 1054 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

std::vector<brcmf_wsec_key_le> GetKeyList (uint16_t ifidx)

This function returns the wsec_key_list for an iface to outside.

Defined at line 1691 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusSuspend ()

Defined at line 3720 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t BusResume ()

Defined at line 3722 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

void BusRecovery ()

Defined at line 3724 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

std::optional<drivers::components::Frame> GetRxFrame ()

Defined at line 1059 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarIfaceVarSet (SimIovarSetReq * req)

Direct handlers for different iovars.

Defined at line 2532 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarIfaceVarGet (SimIovarGetReq * req)

Defined at line 2542 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarSet (SimIovarSetReq * req)

Defined at line 2552 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarGet (SimIovarGetReq * req)

Defined at line 2558 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarAssocInfoGet (SimIovarGetReq * req)

Defined at line 2868 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarAssocMgrCmdSet (SimIovarSetReq * req)

Defined at line 2735 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarAssocRespIesGet (SimIovarGetReq * req)

Defined at line 2875 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarBssSet (SimIovarSetReq * req)

Defined at line 2728 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarCapGet (SimIovarGetReq * req)

Defined at line 2884 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarChanspecSet (SimIovarSetReq * req)

Defined at line 2676 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarCrashSet (SimIovarSetReq * req)

Defined at line 2812 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarCurEtheraddrSet (SimIovarSetReq * req)

Defined at line 2564 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarCurEtheraddrGet (SimIovarGetReq * req)

Defined at line 2570 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarEscanSet (SimIovarSetReq * req)

Defined at line 2702 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarInterfaceRemoveSet (SimIovarSetReq * req)

Defined at line 2694 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarJoinSet (SimIovarSetReq * req)

Defined at line 2712 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarNmodeGet (SimIovarGetReq * req)

Defined at line 2889 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarMpcSet (SimIovarSetReq * req)

Defined at line 2683 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarPfnMacaddrSet (SimIovarSetReq * req)

Defined at line 2578 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarPfnMacaddrGet (SimIovarGetReq * req)

Defined at line 2583 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarRrmGet (SimIovarGetReq * req)

Defined at line 2903 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarRxchainGet (SimIovarGetReq * req)

Defined at line 2823 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarSnrGet (SimIovarGetReq * req)

Defined at line 2833 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarSsidSet (SimIovarSetReq * req)

Defined at line 2698 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarStbcTxSet (SimIovarSetReq * req)

Defined at line 2588 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarStbcTxGet (SimIovarGetReq * req)

Defined at line 2603 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarTargetBssInfoGet (SimIovarGetReq * req)

Defined at line 2609 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarTxstreamsSet (SimIovarSetReq * req)

Defined at line 2625 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarTxstreamsGet (SimIovarGetReq * req)

Defined at line 2636 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarVerGet (SimIovarGetReq * req)

Defined at line 2818 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarVhtModeGet (SimIovarGetReq * req)

Defined at line 2896 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarWmeAcStaGet (SimIovarGetReq * req)

Defined at line 2910 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarWmeApsdGet (SimIovarGetReq * req)

Defined at line 2940 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarWsecKeySet (SimIovarSetReq * req)

Defined at line 2642 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarWsecKeyGet (SimIovarGetReq * req)

Defined at line 2664 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarWstatsCountersGet (SimIovarGetReq * req)

Defined at line 2842 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarWmeCounterGet (SimIovarGetReq * req)

Defined at line 2946 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarBwCapGet (SimIovarGetReq * req)

The bw_cap iovar uses the passed in value as both the parameter and the return value.

Defined at line 2970 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

zx_status_t IovarChanspecsGet (SimIovarGetReq * req)

Defined at line 2999 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/sim_fw.cc

Records