qcacld-3.0: Fix tdls idle peers data override
As part of connection tracker handler, If the link is connected
then current tx and rx stats are compared with configured threshold
values. If the current stats fall below the threshold then idle timer
is initialized and idle peer data is stored in tdls soc and given as
userdata to the timer handler. The userdata is overwritten if the another
tdls peer becomes idle and this can lead to wrong tdls peer teardown.
Change-Id: I34638bdebe02e17e1c9e117e58352bdaab867921
CRs-Fixed: 2393320
diff --git a/components/tdls/core/src/wlan_tdls_main.h b/components/tdls/core/src/wlan_tdls_main.h
index e50b552..d4d4a7a 100644
--- a/components/tdls/core/src/wlan_tdls_main.h
+++ b/components/tdls/core/src/wlan_tdls_main.h
@@ -94,10 +94,12 @@
* @session_id: session id
* @sta_id: sta id
* @peer_mac: peer address
+ * @index: index to store array offset.
*/
struct tdls_conn_info {
uint8_t session_id;
uint8_t sta_id;
+ uint8_t index;
struct qdf_mac_addr peer_mac;
};
@@ -128,16 +130,6 @@
};
/**
- * struct tdls_ct_idle_peer_data - connection tracker idle peer info
- * @vdev: vdev object
- * @tdls_info: tdls connection info
- */
-struct tdls_ct_idle_peer_data {
- struct wlan_objmgr_vdev *vdev;
- struct tdls_conn_info *tdls_info;
-};
-
-/**
* struct tdls_set_state_db - to record set tdls state command, we need to
* set correct tdls state to firmware:
* 1. enable tdls in firmware before tdls connection;
@@ -229,7 +221,6 @@
uint16_t tdls_update_peer_state;
uint16_t tdls_del_all_peers;
uint32_t tdls_update_dp_vdev_flags;
- struct tdls_ct_idle_peer_data tdls_idle_peer_data;
qdf_spinlock_t tdls_ct_spinlock;
};