summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authortangyuxin <[email protected]>2019-07-31 11:57:37 +0800
committertangyuxin <[email protected]>2019-07-31 11:57:37 +0800
commit7d801615b26adc7f5dccfa9a36faef1f8f62ee96 (patch)
treec98e530bb57452a47a2db1ce10821a6a85fc67eb /components/drivers
parent70cec89b58d9418b2f04019adb89f747b86e6603 (diff)
[components][drivers][wlan] 修复密码临界值判断错误
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/wlan/wlan_dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/wlan/wlan_dev.c b/components/drivers/wlan/wlan_dev.c
index 2490c2c456..375b27fb10 100644
--- a/components/drivers/wlan/wlan_dev.c
+++ b/components/drivers/wlan/wlan_dev.c
@@ -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;