Browse Source

qcacld-3.0: Update peer if add TDLS is rejected in of case ongoing setup

In case two clients try to establish the TDLS connection simultaneously,
the peer who is able to transmit the setup request first will be
connected and the other request is in driver without notifying the peer.
This causes peer to get stuck waiting for the TDLS setup response. So,
send TDLS setup response with unspecified failure reason code, ift here
is already TDLS setup.
Also, drop the setup response only if status code is zero in case setup
is already in progress. This way if the status code is set which will be
set in tdls_activate_add_peer(), in case of request already in process,
the same error code can be notified to the peer.

Change-Id: I83fea4586d6e344a86a9185b078e4d87ec38c664
CRs-Fixed: 2771973
Utkarsh Bhatnagar 4 years ago
parent
commit
3fb55f01e4
1 changed files with 9 additions and 3 deletions
  1. 9 3
      components/tdls/core/src/wlan_tdls_cmds_process.c

+ 9 - 3
components/tdls/core/src/wlan_tdls_cmds_process.c

@@ -709,10 +709,16 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 			return -EAGAIN;
 		}
 	}
-
+	/*
+	 * In case another tdls request comes while tdls setup is already
+	 * ongoing with one peer. Reject only when status code is 0. If status
+	 * code is non-zero, it means supplicant already rejected it and
+	 * the same should be notified to peer.
+	 */
 	if (TDLS_IS_SETUP_ACTION(tdls_validate->action_code)) {
-		if (tdls_is_progress(tdls_vdev,
-			tdls_validate->peer_mac, true)) {
+		if (tdls_is_progress(tdls_vdev, tdls_validate->peer_mac,
+				     true) &&
+				     tdls_validate->status_code == 0) {
 			tdls_err("setup is ongoing. action %d declined for "
 				 QDF_MAC_ADDR_FMT,
 				 tdls_validate->action_code,