diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index 23c580951808..4ca57dc8216e 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -1402,8 +1402,8 @@ static QDF_STATUS tdls_add_peer_rsp(struct tdls_add_sta_rsp *rsp) conn_rec[sta_idx].index = sta_idx; qdf_copy_macaddr(&conn_rec[sta_idx].peer_mac, &rsp->peermac); - tdls_debug("TDLS: Add sta mac " - QDF_MAC_ADDR_STR, + tdls_debug("TDLS: Add sta mac at idx %d" + QDF_MAC_ADDR_STR, sta_idx, QDF_MAC_ADDR_ARRAY (rsp->peermac.bytes)); break; @@ -1487,7 +1487,7 @@ QDF_STATUS tdls_process_del_peer_rsp(struct tdls_del_sta_rsp *rsp) continue; macaddr = rsp->peermac.bytes; - tdls_debug("TDLS: del STA"); + tdls_debug("TDLS: del STA with sta_idx %d", sta_idx); curr_peer = tdls_find_peer(vdev_obj, macaddr); if (curr_peer) { tdls_debug(QDF_MAC_ADDR_STR " status is %d", diff --git a/components/tdls/core/src/wlan_tdls_ct.c b/components/tdls/core/src/wlan_tdls_ct.c index db88afc66186..ba334aea89c3 100644 --- a/components/tdls/core/src/wlan_tdls_ct.c +++ b/components/tdls/core/src/wlan_tdls_ct.c @@ -570,7 +570,9 @@ tdls_get_conn_info(struct tdls_soc_priv_obj *tdls_soc, if (!qdf_mem_cmp( tdls_soc->tdls_conn_info[sta_idx].peer_mac.bytes, peer_mac->bytes, QDF_MAC_ADDR_SIZE)) { - tdls_debug("tdls peer exists %pM", peer_mac->bytes); + tdls_debug("tdls peer exists idx %d " QDF_MAC_ADDR_STR, + sta_idx, + QDF_MAC_ADDR_ARRAY(peer_mac->bytes)); tdls_soc->tdls_conn_info[sta_idx].index = sta_idx; return &tdls_soc->tdls_conn_info[sta_idx]; } @@ -647,8 +649,11 @@ void tdls_ct_idle_handler(void *user_data) return; idx = tdls_info->index; - if (idx == INVALID_TDLS_PEER_INDEX || idx >= WLAN_TDLS_STA_MAX_NUM) + if (idx == INVALID_TDLS_PEER_INDEX || idx >= WLAN_TDLS_STA_MAX_NUM) { + tdls_debug("invalid peer index %d" QDF_MAC_ADDR_STR, idx, + QDF_MAC_ADDR_ARRAY(tdls_info->peer_mac.bytes)); return; + } tdls_soc_obj = qdf_container_of(tdls_info, struct tdls_soc_priv_obj, tdls_conn_info[idx]); diff --git a/components/tdls/core/src/wlan_tdls_peer.c b/components/tdls/core/src/wlan_tdls_peer.c index 6320583122ea..1107f8956b3e 100644 --- a/components/tdls/core/src/wlan_tdls_peer.c +++ b/components/tdls/core/src/wlan_tdls_peer.c @@ -867,6 +867,14 @@ QDF_STATUS tdls_reset_peer(struct tdls_vdev_priv_obj *vdev_obj, ®_bw_offset); } + if (curr_peer->is_peer_idle_timer_initialised) { + tdls_debug(QDF_MAC_ADDR_STR ": destroy idle timer ", + QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes)); + qdf_mc_timer_stop(&curr_peer->peer_idle_timer); + qdf_mc_timer_destroy(&curr_peer->peer_idle_timer); + curr_peer->is_peer_idle_timer_initialised = false; + } + tdls_set_peer_link_status(curr_peer, TDLS_LINK_IDLE, TDLS_LINK_UNSPECIFIED); curr_peer->valid_entry = false;