fix: sync 2.4G 5G wifi channel

Signed-off-by: YOUR_NAME <xusai4@huawei.com>
This commit is contained in:
YOUR_NAME 2022-09-28 14:20:02 +00:00
parent d816b3d62d
commit 89a2f6455d

View File

@ -168,11 +168,8 @@ static void WifiStateEventHandler(const LnnEventBasicInfo *info)
break;
case SOFTBUS_WIFI_CONNECTED:
(void)LnnSetNetCapability(&netCapability, BIT_WIFI);
if (SoftBusGetLinkBand() == BAND_5G) {
(void)LnnSetNetCapability(&netCapability, BIT_WIFI_5G);
} else {
(void)LnnSetNetCapability(&netCapability, BIT_WIFI_24G);
}
(void)LnnSetNetCapability(&netCapability, BIT_WIFI_5G);
(void)LnnSetNetCapability(&netCapability, BIT_WIFI_24G);
break;
case SOFTBUS_WIFI_DISCONNECTED:
(void)LnnClearNetCapability(&netCapability, BIT_WIFI);