src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/dynamic_if_test.cc
// Start SoftAP after client assoc. SoftAP's channel should get set to client's channel
Start SoftAP after client assoc. SoftAP's channel should get set to client's channel
Start SoftAP after client assoc . SoftAP ' s channel should get set to client ' s channel
TEST_F(DynamicIfTest, CheckSoftAPChannel) {
  Init();
  StartInterface(WLAN_INFO_MAC_ROLE_CLIENT, &client_ifc_);
  StartInterface(WLAN_INFO_MAC_ROLE_AP, &softap_ifc_);
  simulation::FakeAp ap(env_.get(), kDefaultBssid, kDefaultSsid, kDefaultChannel);
  zx::duration delay = zx::msec(10);
  client_ifc_.AssociateWith(ap, delay);
  delay += zx::msec(10);
  SCHEDULE_CALL(delay, &SimInterface::StartSoftAp, &softap_ifc_, SimInterface::kDefaultSoftApSsid,
                kDefaultChannel, 100, 100);
  delay += kStartAPConfDelay + zx::msec(10);
  SCHEDULE_CALL(delay, &DynamicIfTest::ChannelCheck, this);
  env_->Run(kTestDuration);
  EXPECT_EQ(client_ifc_.stats_.assoc_successes, 1U);
}
TEST_F ( DynamicIfTest , CheckSoftAPChannel ) { Init ( ) ; StartInterface ( WLAN_INFO_MAC_ROLE_CLIENT , & client_ifc_ ) ; StartInterface ( WLAN_INFO_MAC_ROLE_AP , & softap_ifc_ ) ; simulation :: FakeAp ap ( env_ . get ( ) , kDefaultBssid , kDefaultSsid , kDefaultChannel ) ; zx :: duration delay = zx :: msec ( 10 ) ; client_ifc_ . AssociateWith ( ap , delay ) ; delay += zx :: msec ( 10 ) ; SCHEDULE_CALL ( delay , & SimInterface :: StartSoftAp , & softap_ifc_ , SimInterface :: kDefaultSoftApSsid , kDefaultChannel , 100 , 100 ) ; delay += kStartAPConfDelay + zx :: msec ( 10 ) ; SCHEDULE_CALL ( delay , & DynamicIfTest :: ChannelCheck , this ) ; env_ -> Run ( kTestDuration ) ; EXPECT_EQ ( client_ifc_ . stats_ . assoc_successes , 1U ) ; }
Start SoftAP after client assoc.
Start SoftAP after client assoc .
// Create our device instances // Start up our fake AP // Associate to FakeAp // Start our SoftAP // Wait until SIM FW sends AP Start confirmation. This is set as a // scheduled event to ensure test runs until AP Start confirmation is // received.