Merge pull request #2911 from enkiller/wlan

[components][drivers][wlan] 修复密码临界值判断错误
This commit is contained in:
Bernard Xiong 2019-08-05 08:34:48 +08:00 committed by GitHub
commit 45a3172719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -147,8 +147,8 @@ rt_err_t rt_wlan_dev_ap_start(struct rt_wlan_device *device, struct rt_wlan_info
return -RT_ERROR;
}
if ((password_len >= RT_WLAN_PASSWORD_MAX_LENGTH) ||
(info->ssid.len >= RT_WLAN_SSID_MAX_LENGTH))
if ((password_len > RT_WLAN_PASSWORD_MAX_LENGTH) ||
(info->ssid.len > RT_WLAN_SSID_MAX_LENGTH))
{
LOG_E("L:%d password or ssid is to long", __LINE__);
return -RT_ERROR;
@ -528,7 +528,7 @@ rt_err_t rt_wlan_dev_scan(struct rt_wlan_device *device, struct rt_wlan_info *in
if (info != RT_NULL)
{
if (info->ssid.len >= RT_WLAN_SSID_MAX_LENGTH)
if (info->ssid.len > RT_WLAN_SSID_MAX_LENGTH)
{
LOG_E("L:%d ssid is to long", __LINE__);
return -RT_EINVAL;