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 537975656c wifi: Add handle type for disconnecting event
537975656c is described below

commit 537975656c12ef3929938b85b6d0ad1eb7ac8753
Author: zhanghongyu <[email protected]>
AuthorDate: Mon Jun 27 14:32:10 2022 +0800

    wifi: Add handle type for disconnecting event
    
    Some disconnected events will be missed
    
    Signed-off-by: zhanghongyu <[email protected]>
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
index e8c5cdcdee..b89c11b69f 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
@@ -576,6 +576,8 @@ int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv)
                       WLC_E_JOIN);
   bcmf_event_register(priv, bcmf_wl_auth_event_handler,
                       WLC_E_SET_SSID);
+  bcmf_event_register(priv, bcmf_wl_auth_event_handler,
+                      WLC_E_DEAUTH);
   bcmf_event_register(priv, bcmf_wl_auth_event_handler,
                       WLC_E_DEAUTH_IND);
   bcmf_event_register(priv, bcmf_wl_auth_event_handler,
@@ -645,7 +647,11 @@ void bcmf_wl_auth_event_handler(FAR struct bcmf_dev_s 
*priv,
           auth = true;
         }
     }
-  else if (type == WLC_E_DISASSOC)
+  else if (type == WLC_E_DEAUTH ||
+           type == WLC_E_DEAUTH_IND ||
+           type == WLC_E_DISASSOC ||
+           type == WLC_E_DISASSOC_IND ||
+           (type == WLC_E_LINK && reason != 0))
     {
       carrier = 0;
     }

Reply via email to