From 3928e1b4bb085edf17ac081442cd212f22c4e185 Mon Sep 17 00:00:00 2001 From: yanxiaotao Date: Thu, 26 May 2022 10:30:46 +0800 Subject: [PATCH] bugfix from master 0526 Signed-off-by: yanxiaotao --- .../interfaces/innerkits/native_cpp/napi/wifi_napi_hotspot.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wifi/interfaces/innerkits/native_cpp/napi/wifi_napi_hotspot.cpp b/wifi/interfaces/innerkits/native_cpp/napi/wifi_napi_hotspot.cpp index 66ad7ad6d..ddfb4a556 100644 --- a/wifi/interfaces/innerkits/native_cpp/napi/wifi_napi_hotspot.cpp +++ b/wifi/interfaces/innerkits/native_cpp/napi/wifi_napi_hotspot.cpp @@ -110,6 +110,9 @@ static bool GetHotspotconfigFromJs(const napi_env& env, const napi_value& object value = 0; JsObjectToInt(env, object, "band", value); config.SetBand(BandType(value)); // 1: 2.4G, 2: 5G + if (config.GetBand() == BandType::BAND_5GHZ) { + config.SetChannel(AP_CHANNEL_5G_DEFAULT); + } value = 0; JsObjectToString(env, object, "preSharedKey", 64, str); // 64: max length config.SetPreSharedKey(str); -- Gitee