Loading
qcacld-3.0: De-initialize idle timer on tdls peer reset
Currently idle timer does not gets de-initialize on tdls peer reset because of which there could be a possibility that in case of multiple tdls connection and disconnection with multiple peers, this timer might get assigned and re-assigned to different peers which may lead to an issue where this timer never gets started for the required peer. In current scenario whenever the first TDLS connection (Peer a with sta_idx 0) happens, tdls peer idle timer object is initialized with “&tdls_soc->tdls_conn_info[0];”. Now if this peer a gets disconnected and peer b gets connected and peer gets the same sta_idx 0, then peer will be associated with timer “&tdls_soc->tdls_conn_info[0];”,hence 2 timer init happens with the same sta_idx for peer a and peer b. (here peer a is in disconnected state and peer b is in connected state) Now if peer a gets connected it will get the sta_idx 1, as timer initialization is already done for peer a with sta index 0 so timer initialization will not be done again. Now if peer b gets disconnected it will set the tdls_info for sta_idx 0 to invalid (INVALID_TDLS_PEER_INDEX). Now for peer a timer will be started and when timer expires in timer handler function “tdls_ct_idle_handler” will not be invoked as sta_idx is already set to INVALID_TDLS_PEER_INDEX. To address above issue, de-initialize the idle timer for tdls peer on every tdls peer reset. CRs-Fixed: 2746046 Change-Id: Icc2e64a9299852d5b29d26dec79b7f1efb2594b8