This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 398734500e wifi: parse channel from IE when ctl_ch is 0
398734500e is described below

commit 398734500eb144dbc23a84e5a23b7ca3c25e86b8
Author: zhanghongyu <zhanghon...@xiaomi.com>
AuthorDate: Fri Jul 8 15:43:41 2022 +0800

    wifi: parse channel from IE when ctl_ch is 0
    
    Signed-off-by: zhanghongyu <zhanghon...@xiaomi.com>
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
index b89c11b69f..573b18147e 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
@@ -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 *)

Reply via email to