Browse Source

qcacmn: Check AP support OCV before enable it

Add missing change I4ab3c956c3169b50a69c05d9ed1c36e055aeb586
in connection manager to disable OCV in STA RSN capability
if AP doesnt support it.

Change-Id: I84b666a489b8f2e410a4901b908f57edae86b5d4
CRs-Fixed: 2960828
Abhishek Singh 4 years ago
parent
commit
84138c387f
1 changed files with 7 additions and 3 deletions
  1. 7 3
      umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

+ 7 - 3
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -1479,10 +1479,14 @@ cm_resume_connect_after_peer_create(struct cnx_mgr *cm_ctx, wlan_cm_id *cm_id)
 		rsn_caps &= ~WLAN_CRYPTO_RSN_CAP_MFP_ENABLED;
 		rsn_caps &= ~WLAN_CRYPTO_RSN_CAP_MFP_REQUIRED;
 		rsn_caps &= ~WLAN_CRYPTO_RSN_CAP_OCV_SUPPORTED;
-		wlan_crypto_set_vdev_param(cm_ctx->vdev,
-					   WLAN_CRYPTO_PARAM_RSN_CAP,
-					   rsn_caps);
 	}
+	/* Reset OCV if AP doesnt support */
+	if (!(neg_sec_info->rsn_caps & WLAN_CRYPTO_RSN_CAP_OCV_SUPPORTED))
+		rsn_caps &= ~WLAN_CRYPTO_RSN_CAP_OCV_SUPPORTED;
+
+	/* Update the new caps */
+	wlan_crypto_set_vdev_param(cm_ctx->vdev, WLAN_CRYPTO_PARAM_RSN_CAP,
+				   rsn_caps);
 
 	req.vdev_id = wlan_vdev_get_id(cm_ctx->vdev);
 	req.cm_id = *cm_id;