1
0
Fork 0
forked from nuttx/nuttx-update

wifi: parse channel from IE when ctl_ch is 0

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2022-07-08 15:43:41 +08:00 committed by Xiang Xiao
parent 6b070b2b00
commit 398734500e

View file

@ -771,11 +771,6 @@ void bcmf_wl_scan_event_handler(FAR struct bcmf_dev_s *priv,
continue;
}
if (bss->ctl_ch == 0)
{
continue;
}
ie_offset = 0;
ie_buffer = (FAR uint8_t *)bss + bss->ie_offset;
@ -801,6 +796,16 @@ void bcmf_wl_scan_event_handler(FAR struct bcmf_dev_s *priv,
switch (ie_buffer[ie_offset])
{
case WLAN_EID_DS_PARAMS:
{
if (bss->ctl_ch == 0)
{
bss->ctl_ch = ie_buffer[ie_offset + 2];
}
break;
}
case WLAN_EID_RSN:
{
FAR wpa_rsn_t *rsn = (FAR wpa_rsn_t *)