src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/dynamic_if_test.cc
// This test verifies that if we want to create an client iface with the same MAC address as the
// pre-set one, no error will be returned.
This test verifies that if we want to create an client iface with the same MAC address as the
pre-set one, no error will be returned.
This test verifies that if we want to create an client iface with the same MAC address as the pre - set one no error will be returned .
TEST_F(DynamicIfTest, CreateClientwithPreAllocMac) {
  Init();
  common::MacAddr pre_set_mac;
  brcmf_simdev* sim = device_->GetSim();
  struct brcmf_if* ifp = brcmf_get_ifp(sim->drvr, 0);
  zx_status_t status =
      brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", pre_set_mac.byte, ETH_ALEN, nullptr);
  EXPECT_EQ(status, ZX_OK);
  EXPECT_EQ(StartInterface(WLAN_INFO_MAC_ROLE_CLIENT, &client_ifc_, std::nullopt, pre_set_mac),
            ZX_OK);
  EXPECT_EQ(DeviceCount(), static_cast<size_t>(2));
  DeleteInterface(client_ifc_);
  EXPECT_EQ(DeviceCount(), static_cast<size_t>(1));
}
TEST_F ( DynamicIfTest , CreateClientwithPreAllocMac ) { Init ( ) ; common :: MacAddr pre_set_mac ; brcmf_simdev * sim = device_ -> GetSim ( ) ; struct brcmf_if * ifp = brcmf_get_ifp ( sim -> drvr , 0 ) ; zx_status_t status = brcmf_fil_iovar_data_get ( ifp , " " , pre_set_mac . byte , ETH_ALEN , nullptr ) ; EXPECT_EQ ( status , ZX_OK ) ; EXPECT_EQ ( StartInterface ( WLAN_INFO_MAC_ROLE_CLIENT , & client_ifc_ , std :: nullopt , pre_set_mac ) , ZX_OK ) ; EXPECT_EQ ( DeviceCount ( ) , static_cast < size_t > ( 2 ) ) ; DeleteInterface ( client_ifc_ ) ; EXPECT_EQ ( DeviceCount ( ) , static_cast < size_t > ( 1 ) ) ; }
This test verifies that if we want to create an client iface with the same MAC address as the
pre-set one, no error will be returned.
This test verifies that if we want to create an client iface with the same MAC address as the pre - set one no error will be returned .