summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorEvlers <[email protected]>2024-03-24 00:38:14 +0800
committerMeco Man <[email protected]>2024-04-16 22:29:45 -0400
commit5f0504a25ed8bf6bb65b55acb3caf7bdff641c53 (patch)
tree584537159164b0454efb7e4b6b73d12628549233 /components
parent26d37e90ea5bae92cff1bf6d70ba6f24de9f6606 (diff)
[wlan] add the wlan join scan function
Diffstat (limited to 'components')
-rwxr-xr-xcomponents/drivers/Kconfig4
-rw-r--r--components/drivers/wlan/wlan_mgnt.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig
index 486dae6525..df4ba06a91 100755
--- a/components/drivers/Kconfig
+++ b/components/drivers/Kconfig
@@ -811,6 +811,10 @@ menuconfig RT_USING_WIFI
bool "MSH command Enable"
default y
+ config RT_WLAN_JOIN_SCAN_BY_MGNT
+ bool "Enable wlan join scan"
+ default y
+
config RT_WLAN_AUTO_CONNECT_ENABLE
bool "Auto connect Enable"
select RT_WLAN_CFG_ENABLE
diff --git a/components/drivers/wlan/wlan_mgnt.c b/components/drivers/wlan/wlan_mgnt.c
index 9fae21afff..5eccdfd101 100644
--- a/components/drivers/wlan/wlan_mgnt.c
+++ b/components/drivers/wlan/wlan_mgnt.c
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2018-08-06 tyx the first version
+ * 2023-12-12 Evlers add the wlan join scan function
*/
#include <rthw.h>
@@ -858,7 +859,7 @@ static void rt_wlan_join_scan_callback(int event, struct rt_wlan_buff *buff, voi
info->ssid.len == tgt_info->ssid.len)
{
/*Get the rssi the max ap*/
- if(info->rssi > tgt_info->rssi)
+ if((info->rssi > tgt_info->rssi) || (tgt_info->rssi == 0))
{
tgt_info->security = info->security;
tgt_info->band = info->band;