From d11776adb8be76118a833bd2d44eaef022f9de2b Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Mon, 10 Jun 2019 17:44:59 +0530 Subject: [PATCH] qcacld-3.0: Remove BSSID from BLM reject ap list in disconnect Remove the BSSID entry from the blacklist manager reject ap list when the bad bssid counter gets over. Change-Id: I833d161d97afd5c13a23ae48b1aded38d55b25e4 CRs-Fixed: 2468236 --- .../blacklist_mgr/core/src/wlan_blm_core.c | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/components/blacklist_mgr/core/src/wlan_blm_core.c b/components/blacklist_mgr/core/src/wlan_blm_core.c index aff479f6f773..b2070ce51fe8 100644 --- a/components/blacklist_mgr/core/src/wlan_blm_core.c +++ b/components/blacklist_mgr/core/src/wlan_blm_core.c @@ -962,6 +962,7 @@ blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev, struct blm_reject_ap *blm_entry = NULL; qdf_time_t connection_age = 0; bool entry_found = false; + qdf_time_t max_entry_time; blm_ctx = blm_get_pdev_obj(pdev); blm_psoc_obj = blm_get_psoc_obj(wlan_pdev_get_psoc(pdev)); @@ -1006,11 +1007,24 @@ blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev, blm_entry->connect_timestamp = qdf_mc_timer_get_system_time(); break; case BLM_AP_DISCONNECTED: + /* Update the blm info first */ + blm_update_ap_info(blm_entry, &blm_psoc_obj->blm_cfg, NULL); + + max_entry_time = blm_entry->connect_timestamp; + if (blm_entry->driver_blacklist) { + max_entry_time = + blm_entry->ap_timestamp.driver_blacklist_timestamp; + } else if (blm_entry->driver_avoidlist) { + max_entry_time = + QDF_MAX(blm_entry->ap_timestamp.driver_avoid_timestamp, + blm_entry->connect_timestamp); + } connection_age = qdf_mc_timer_get_system_time() - - blm_entry->connect_timestamp; - if (connection_age > - blm_psoc_obj->blm_cfg.bad_bssid_counter_reset_time) { - blm_debug("Bad Bssid timer expired, removed %pM from list", + max_entry_time; + if ((connection_age > + blm_psoc_obj->blm_cfg.bad_bssid_counter_reset_time) || + !blm_entry->reject_ap_type) { + blm_debug("Bad Bssid timer expired/AP cleared from all blacklisting, removed %pM from list", blm_entry->bssid.bytes); qdf_list_remove_node(&blm_ctx->reject_ap_list, &blm_entry->node);