diff options
author | Dennis Jeon <dennis.jeon@broadcom.corp-partner.google.com> | 2022-09-19 18:36:45 +0900 |
---|---|---|
committer | Roger Wang <wangroger@google.com> | 2022-09-21 06:56:05 +0000 |
commit | 49bab3713f0383eab3e1eb16ecc25a947c1d4593 (patch) | |
tree | 3b459fb5cf280475927f5dbb8e21f1939a78e84d | |
parent | 0ca65009a4daedf633d6059449f219f26f180c90 (diff) | |
download | bcm4389-android-gs-bluejay-5.10-android13-qpr1-beta-3.tar.gz |
bcmdhd: Added cleanup keepalive routine in ndo_stop contextandroid-t-qpr1-beta-3_r0.4android-t-qpr1-beta-3_r0.3android-13.0.0_r0.59android-13.0.0_r0.58android-13.0.0_r0.54android-13.0.0_r0.53android-13.0.0_r0.49android-13.0.0_r0.48main-16k-gs-raviole-5.10android-gs-raviole-5.10-android13-qpr1-beta-3android-gs-raviole-5.10-android13-qpr1android-gs-bluejay-5.10-android13-qpr1-beta-3android-gs-bluejay-5.10-android13-qpr1
It is fixed in firmware side. DHD also needs to be fixed to avoid out of sync state of keepalive
[ Analysis ]
Founded that the suspicious logs are seen in the previous link down an interface down operation.
While wl_event_handler(WLC_E_LINK) was processing, Wificond called .ndo_stop and deleted the interface and dhdinfo->iflist[idx] is set NULL.
so, DHD failed to send IOVAR "mkeep_alive" due to dhdinfo->iflist[idx] is NULL.
this problem seems to make an out of sync state and caused a trap.
[ Solution ]
It is good to clean up the keepalive at the point of interface down
Calls wl_cleanup_keep_alive() in _wl_cfg80211_del_if() to prevent the case where the interface is deleted by .ndo_stop
Bug: 243787387
Test: Passed on Korea SVT test cycle and the way to reproduce
Change-Id: I7a9e2d5f7720d727cc8ff0eba6cbf00eb2afb4a0
Signed-off-by: Dennis Jeon <dennis.jeon@broadcom.corp-partner.google.com>
-rw-r--r-- | wl_cfg80211.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/wl_cfg80211.c b/wl_cfg80211.c index 96112d4..1dfadc3 100644 --- a/wl_cfg80211.c +++ b/wl_cfg80211.c @@ -2410,6 +2410,13 @@ wl_cfg80211_iface_state_ops(struct wireless_dev *wdev, } #endif /* CUSTOM_SET_CPUCORE */ wl_add_remove_pm_enable_work(cfg, WL_PM_WORKQ_DEL); + +#if defined(KEEP_ALIVE) && defined(DHD_CLEANUP_KEEP_ALIVE) + if ((ndev == cfg->inet_ndev) && cfg->mkeep_alive_avail) { + wl_cleanup_keep_alive(ndev, cfg); + } +#endif /* defined(KEEP_ALIVE) && defined(DHD_CLEANUP_KEEP_ALIVE) */ + break; case WL_IF_CREATE_DONE: if (wl_mode == WL_MODE_BSS) { @@ -3040,10 +3047,10 @@ _wl_cfg80211_del_if(struct bcm_cfg80211 *cfg, struct net_device *primary_ndev, #endif /* PCIE_FULL_DONGLE */ #ifdef WL_CELLULAR_CHAN_AVOID - if (wl_iftype == WL_IF_TYPE_AP) { - wl_cellavoid_clear_requested_freq_bands(wdev->netdev, - cfg->cellavoid_info); - } + if (wl_iftype == WL_IF_TYPE_AP) { + wl_cellavoid_clear_requested_freq_bands(wdev->netdev, + cfg->cellavoid_info); + } #endif /* WL_CELLULAR_CHAN_AVOID */ switch (wl_iftype) { @@ -23860,7 +23867,8 @@ wl_cfg80211_stop_mkeep_alive(struct net_device *ndev, struct bcm_cfg80211 *cfg, res = wldev_iovar_getbuf(ndev, "mkeep_alive", &mkeep_alive_id, sizeof(mkeep_alive_id), pbuf, KA_TEMP_BUF_SIZE, &cfg->ioctl_buf_sync); if (res < 0) { - WL_ERR(("%s: Get mkeep_alive failed (error=%d)\n", __FUNCTION__, res)); + WL_ERR(("%s: Get mkeep_alive failed id:%d (error=%d)\n", __FUNCTION__, + mkeep_alive_id, res)); goto exit; } else { /* Check occupied ID */ @@ -25123,6 +25131,7 @@ wl_cleanup_keep_alive(struct net_device *ndev, struct bcm_cfg80211 *cfg) { int mkeep_alive_id; + WL_MEM(("mkeep_alive_avail:%x\n", cfg->mkeep_alive_avail)); for (mkeep_alive_id = 1; mkeep_alive_id < KEEP_ALIVE_ID_MAX; mkeep_alive_id++) { if (isset(&cfg->mkeep_alive_avail, mkeep_alive_id)) { if (wl_cfg80211_stop_mkeep_alive(ndev, cfg, mkeep_alive_id) == BCME_OK) { |