[wlan] Move JoinRequest and BssType to wlan_common

The above mentioned types are used in the public APIs and therefore wlan
common is the right place for these to reside, instead of wlan internal.

Bug: 87050
Change-Id: Ic8c9e83c2b2b3698efbf95e28afb25d89e9461c0
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/836423
API-Review: Rebecca Silberstein <silberst@google.com>
Fuchsia-Auto-Submit: Sakthi Vignesh Radhakrishnan <rsakthi@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Reviewed-by: Charles Celerier <chcl@google.com>
Reviewed-by: Rebecca Silberstein <silberst@google.com>
diff --git a/third_party/iwlwifi2/platform/mvm-mlme.cc b/third_party/iwlwifi2/platform/mvm-mlme.cc
index 1456f65..97a0614 100644
--- a/third_party/iwlwifi2/platform/mvm-mlme.cc
+++ b/third_party/iwlwifi2/platform/mvm-mlme.cc
@@ -420,7 +420,7 @@
 
 // This is called after mac_set_channel(). The MAC (mvmvif) will be configured as a CLIENT role.
 zx_status_t mac_join_bss(struct iwl_mvm_vif* mvmvif,
-                         const fuchsia_wlan_internal::wire::JoinBssRequest* config) {
+                         const wlan_common_wire::JoinBssRequest* config) {
   zx_status_t ret = ZX_OK;
 
   // Ensure all table fields being accessed are available before proceeding.
@@ -438,7 +438,7 @@
            FMT_SSID_BYTES(config->bssid().data(), sizeof(config->bssid())),
            static_cast<uint32_t>(config->bss_type()), config->remote(), config->beacon_period());
 
-  if (config->bss_type() != fuchsia_wlan_internal::BssType::kInfrastructure) {
+  if (config->bss_type() != wlan_common_wire::BssType::kInfrastructure) {
     IWL_ERR(mvmvif, "invalid bss_type requested: %d\n", static_cast<uint32_t>(config->bss_type()));
     return ZX_ERR_INVALID_ARGS;
   }
diff --git a/third_party/iwlwifi2/platform/mvm-mlme.h b/third_party/iwlwifi2/platform/mvm-mlme.h
index b664cdd..162fa14 100644
--- a/third_party/iwlwifi2/platform/mvm-mlme.h
+++ b/third_party/iwlwifi2/platform/mvm-mlme.h
@@ -62,7 +62,7 @@
 void mac_stop(struct iwl_mvm_vif* mvmvif);
 zx_status_t mac_set_channel(struct iwl_mvm_vif* mvmvif, const wlan_channel_t* channel);
 zx_status_t mac_join_bss(struct iwl_mvm_vif* mvmvif,
-                         const fuchsia_wlan_internal::wire::JoinBssRequest* config);
+                         const fuchsia_wlan_common::wire::JoinBssRequest* config);
 zx_status_t mac_leave_bss(struct iwl_mvm_vif* mvmvif);
 zx_status_t mac_enable_beaconing(
     void* ctx, const wlan_softmac_wire::WlanSoftmacEnableBeaconingRequest* request);
diff --git a/third_party/iwlwifi2/test/wlan-softmac-device-test.cc b/third_party/iwlwifi2/test/wlan-softmac-device-test.cc
index 8503f0a..a9121e7 100644
--- a/third_party/iwlwifi2/test/wlan-softmac-device-test.cc
+++ b/third_party/iwlwifi2/test/wlan-softmac-device-test.cc
@@ -53,8 +53,8 @@
 constexpr size_t kWlanSoftmacBandCapabilityBufferSize =
     fidl::MaxSizeInChannel<fuchsia_wlan_softmac::wire::WlanSoftmacBandCapability,
                            fidl::MessageDirection::kReceiving>();
-constexpr fuchsia_wlan_internal::BssType kDefaultBssType =
-    fuchsia_wlan_internal::wire::BssType::kInfrastructure;
+constexpr fuchsia_wlan_common::wire::BssType kDefaultBssType =
+    fuchsia_wlan_common::wire::BssType::kInfrastructure;
 
 class WlanSoftmacDeviceTest : public SingleApTest,
                               public fdf::WireServer<fuchsia_wlan_softmac::WlanSoftmacIfc> {
@@ -555,9 +555,9 @@
   }
 
   zx_status_t JoinBssRequest(uint16_t beacon_period = kDefaultBeaconPeriod,
-                             fuchsia_wlan_internal::BssType bss_type = kDefaultBssType) {
+                             fuchsia_wlan_common::wire::BssType bss_type = kDefaultBssType) {
     fidl::Arena fidl_arena;
-    auto builder = fuchsia_wlan_internal::wire::JoinBssRequest::Builder(fidl_arena);
+    auto builder = fuchsia_wlan_common::wire::JoinBssRequest::Builder(fidl_arena);
     builder.bssid(kBssid);
     builder.bss_type(bss_type);
     builder.remote(true);
@@ -945,15 +945,13 @@
 // Test unsupported bss_type.
 //
 TEST_F(MacInterfaceTest, UnsupportedBssType) {
-  ASSERT_EQ(
-      ZX_ERR_INVALID_ARGS,
-      JoinBssRequest(kDefaultBeaconPeriod, fuchsia_wlan_internal::wire::BssType::kIndependent));
+  ASSERT_EQ(ZX_ERR_INVALID_ARGS,
+            JoinBssRequest(kDefaultBeaconPeriod, fuchsia_wlan_common::wire::BssType::kIndependent));
 }
 
 TEST_F(MacInterfaceTest, UnsupportedBeaconPeriod) {
-  ASSERT_EQ(ZX_ERR_INVALID_ARGS,
-            JoinBssRequest(IWL_MIN_BEACON_PERIOD_TU - 1,
-                           fuchsia_wlan_internal::wire::BssType::kIndependent));
+  ASSERT_EQ(ZX_ERR_INVALID_ARGS, JoinBssRequest(IWL_MIN_BEACON_PERIOD_TU - 1,
+                                                fuchsia_wlan_common::wire::BssType::kIndependent));
 }
 
 // Test failed ADD_STA command.