diff options
author | Dennis Jeon <dennis.jeon@broadcom.corp-partner.google.com> | 2023-06-27 14:16:33 +0900 |
---|---|---|
committer | Isaac Chiou <isaacchiou@google.com> | 2023-08-14 03:07:32 +0000 |
commit | faee739d4f060efde08fe191bb36f63932687fb9 (patch) | |
tree | 87f216eb6b15de787b749034ec5acd671eb84690 | |
parent | 53d3d50a4277c0ed355c46f1299c9b604af5fac5 (diff) | |
download | bcm4389-faee739d4f060efde08fe191bb36f63932687fb9.tar.gz |
bcmdhd: Deinitialize dbg_ring before ndev cleanup for primary interface
wl_cfgvendor_dbg_ring_send_evt work was processed after cleaning the net_device for primary interface in dhd_detach.
dhd_os_dbg_detach() needs to be called at an early point before cleaning the ndev for the primary interface.
Bug: 286044674
Test: Reboot multiple times
Change-Id: I5d5004ba292326bc124d67191a219e0b77b846c9
Signed-off-by: Dennis Jeon <dennis.jeon@broadcom.corp-partner.google.com>
-rw-r--r-- | dhd_linux.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/dhd_linux.c b/dhd_linux.c index 76d8b22..94b853d 100644 --- a/dhd_linux.c +++ b/dhd_linux.c @@ -14031,6 +14031,16 @@ void dhd_detach(dhd_pub_t *dhdp) } #endif /* CONFIG_HAS_EARLYSUSPEND && DHD_USE_EARLYSUSPEND */ + if (dhdp->dbg) { +#ifdef DEBUGABILITY +#ifdef DBG_PKT_MON + dhd_os_dbg_detach_pkt_monitor(dhdp); + osl_spin_lock_deinit(dhd->pub.osh, dhd->pub.dbg->pkt_mon_lock); +#endif /* DBG_PKT_MON */ +#endif /* DEBUGABILITY */ + dhd_os_dbg_detach(dhdp); + } + /* delete all interfaces, start with virtual */ if (dhd->dhd_state & DHD_ATTACH_STATE_ADD_IF) { int i = 1; @@ -14203,17 +14213,6 @@ void dhd_detach(dhd_pub_t *dhdp) dhdp->dbus = NULL; } #endif /* BCMDBUS */ -#ifdef DEBUGABILITY - if (dhdp->dbg) { -#ifdef DBG_PKT_MON - dhd_os_dbg_detach_pkt_monitor(dhdp); - osl_spin_lock_deinit(dhd->pub.osh, dhd->pub.dbg->pkt_mon_lock); -#endif /* DBG_PKT_MON */ - } -#endif /* DEBUGABILITY */ - if (dhdp->dbg) { - dhd_os_dbg_detach(dhdp); - } #ifdef DHD_MEM_STATS osl_spin_lock_deinit(dhd->pub.osh, dhd->pub.mem_stats_lock); #endif /* DHD_MEM_STATS */ |