[brcmfmac] Delete SimInterface copy constructor
It's easy to accidentally pass an interface by copy when using the
SCHEDULE_CALL macro. Delete the copy constructor to avoid this.
Bug: 53992
Test: None, refactoring of test framework.
Change-Id: I003f3ee1e71d361b118cc5be6f830174efbf9621
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/405435
Reviewed-by: Zhiyi Chen <zhiyichen@google.com>
Testability-Review: Zhiyi Chen <zhiyichen@google.com>
Commit-Queue: Joshua Conner <joshconner@google.com>
diff --git a/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/dynamic_if_test.cc b/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/dynamic_if_test.cc
index bf4f668..c1c1438 100644
--- a/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/dynamic_if_test.cc
+++ b/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/dynamic_if_test.cc
@@ -251,7 +251,7 @@
// Verify Assoc with SoftAP succeeded
SCHEDULE_CALL(zx::msec(150), &DynamicIfTest::VerifyAssocWithSoftAP, this);
- SCHEDULE_CALL(zx::msec(160), &SimInterface::StopSoftAp, softap_ifc_);
+ SCHEDULE_CALL(zx::msec(160), &SimInterface::StopSoftAp, &softap_ifc_);
env_->Run(kTestDuration);
diff --git a/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/sim_test.h b/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/sim_test.h
index 4ed3a90..f84fc75 100644
--- a/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/sim_test.h
+++ b/src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/sim_test.h
@@ -64,6 +64,9 @@
static constexpr uint32_t kDefaultSoftApBeaconPeriod = 100;
static constexpr uint32_t kDefaultSoftApDtimPeriod = 100;
+ SimInterface() = default;
+ SimInterface(const SimInterface&) = delete;
+
zx_status_t Init(std::shared_ptr<simulation::Environment> env, wlan_info_mac_role_t role);
virtual ~SimInterface() {