Prechádzať zdrojové kódy

qcacld-3.0: Enable TDLS in case of STA association failure

TDLS is disabled if second connection comes up.
If that second connection fails then enable
the TDLS again.

Change-Id: Id5df1df81c94bcf3a0616bbfb4b33f3e4d81dcbe
CRs-Fixed: 2445831
Bala Venkatesh 6 rokov pred
rodič
commit
444588c41e

+ 15 - 0
components/tdls/dispatcher/inc/wlan_tdls_ucfg_api.h

@@ -268,6 +268,16 @@ QDF_STATUS ucfg_set_tdls_secoffchanneloffset(struct wlan_objmgr_vdev *vdev,
  */
 QDF_STATUS ucfg_tdls_set_rssi(struct wlan_objmgr_vdev *vdev,
 			      uint8_t *mac, int8_t rssi);
+
+/**
+ * ucfg_tdls_notify_connect_failure() - This api is called if STA/P2P
+ * connection fails on one iface and to enable/disable TDLS on the other
+ * STA/P2P iface which is already connected.
+ * @psoc: psoc object
+ *
+ * Return: void
+ */
+void ucfg_tdls_notify_connect_failure(struct wlan_objmgr_psoc *psoc);
 #else
 
 static inline
@@ -331,5 +341,10 @@ QDF_STATUS ucfg_tdls_set_rssi(struct wlan_objmgr_vdev *vdev,
 {
 	return QDF_STATUS_SUCCESS;
 }
+
+static inline
+void ucfg_tdls_notify_connect_failure(struct wlan_objmgr_psoc *psoc)
+{
+}
 #endif /* FEATURE_WLAN_TDLS */
 #endif

+ 5 - 0
components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c

@@ -1118,3 +1118,8 @@ QDF_STATUS ucfg_tdls_set_rssi(struct wlan_objmgr_vdev *vdev,
 {
 	return tdls_set_rssi(vdev, mac, rssi);
 }
+
+void ucfg_tdls_notify_connect_failure(struct wlan_objmgr_psoc *psoc)
+{
+	return tdls_notify_decrement_session(psoc);
+}

+ 8 - 0
core/hdd/src/wlan_hdd_assoc.c

@@ -3464,6 +3464,14 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 					   timeout_reason);
 		}
 
+		/* Check to change TDLS state in FW
+		 * as connection failed.
+		 */
+		if (roam_status == eCSR_ROAM_ASSOCIATION_FAILURE ||
+		    roam_status == eCSR_ROAM_CANCELLED) {
+			ucfg_tdls_notify_connect_failure(hdd_ctx->psoc);
+		}
+
 		/*
 		 * Set connection state to eConnectionState_NotConnected only
 		 * when CSR has completed operation - with a