src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/dynamic_if_test.cc
// Start both client and SoftAP interfaces simultaneously and check if
// the client can associate to a FakeAP and a fake client can associate to the
// SoftAP.
Start both client and SoftAP interfaces simultaneously and check if
the client can associate to a FakeAP and a fake client can associate to the
SoftAP.
Start both client and SoftAP interfaces simultaneously and check if the client can associate to a FakeAP and a fake client can associate to the SoftAP .
TEST_F(DynamicIfTest, ConnectBothInterfaces) {
  Init();
  StartInterface(WLAN_INFO_MAC_ROLE_CLIENT, &client_ifc_);
  StartInterface(WLAN_INFO_MAC_ROLE_AP, &softap_ifc_);
  softap_ifc_.StartSoftAp();
  simulation::FakeAp ap(env_.get(), kDefaultBssid, kDefaultSsid, kDefaultChannel);
  client_ifc_.AssociateWith(ap, zx::msec(10));
  SCHEDULE_CALL(zx::msec(100), &DynamicIfTest::TxAuthAndAssocReq, this);
  env_->Run(kTestDuration);
  EXPECT_EQ(client_ifc_.stats_.assoc_attempts, 1U);
  EXPECT_EQ(client_ifc_.stats_.assoc_successes, 1U);
  VerifyAssocWithSoftAP();
}
TEST_F ( DynamicIfTest , ConnectBothInterfaces ) { Init ( ) ; StartInterface ( WLAN_INFO_MAC_ROLE_CLIENT , & client_ifc_ ) ; StartInterface ( WLAN_INFO_MAC_ROLE_AP , & softap_ifc_ ) ; softap_ifc_ . StartSoftAp ( ) ; simulation :: FakeAp ap ( env_ . get ( ) , kDefaultBssid , kDefaultSsid , kDefaultChannel ) ; client_ifc_ . AssociateWith ( ap , zx :: msec ( 10 ) ) ; SCHEDULE_CALL ( zx :: msec ( 100 ) , & DynamicIfTest :: TxAuthAndAssocReq , this ) ; env_ -> Run ( kTestDuration ) ; EXPECT_EQ ( client_ifc_ . stats_ . assoc_attempts , 1U ) ; EXPECT_EQ ( client_ifc_ . stats_ . assoc_successes , 1U ) ; VerifyAssocWithSoftAP ( ) ; }
Start both client and SoftAP interfaces simultaneously and check if
the client can associate to a FakeAP and a fake client can associate to the
SoftAP.
Start both client and SoftAP interfaces simultaneously and check if the client can associate to a FakeAP and a fake client can associate to the SoftAP .
// Create our device instances // Start our SoftAP // Start up our fake AP // Associate to FakeAp // Associate to SoftAP // Check if the client's assoc with FakeAP succeeded // Verify Assoc with SoftAP succeeded // TODO(karthikrish) Will add disassoc once support in SIM FW is available