mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
[wlan] add the wlan join scan function
This commit is contained in:
1 parent
26d37e90ea
commit
5f0504a25e
2 files changed
+6
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user