Browse Source

qcacmn: Disallow TKIP/WEP with HT supported client

As softap, send assoc failure if HT supported client try to associate
as WEP/TKIP pairwise key.

Change-Id: Ie33e5d83ec18e10aae51a4cc3515f754bd24774e
CRs-Fixed: 2623660
Nirav Shah 5 years ago
parent
commit
5ad9b66679

+ 6 - 2
umac/cmn_services/crypto/inc/wlan_crypto_global_api.h

@@ -683,6 +683,7 @@ bool wlan_crypto_check_wep(struct wlan_objmgr_psoc *psoc, uint8_t vedv_id);
  * @vdev_id: vdev id
  * @vdev_id: vdev id
  * @ie_ptr: pointer to IEs
  * @ie_ptr: pointer to IEs
  * @ie_len: IE length
  * @ie_len: IE length
+ * @peer_crypto_params: return peer crypto parameters
  *
  *
  * This function gets called from ucfg to check RSN match.
  * This function gets called from ucfg to check RSN match.
  *
  *
@@ -690,7 +691,8 @@ bool wlan_crypto_check_wep(struct wlan_objmgr_psoc *psoc, uint8_t vedv_id);
  */
  */
 bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vedv_id, uint8_t *ie_ptr,
 				 uint8_t vedv_id, uint8_t *ie_ptr,
-				 uint16_t ie_len);
+				 uint16_t ie_len, struct wlan_crypto_params *
+				 peer_crypto_params);
 
 
 /**
 /**
  * wlan_crypto_check_rsn_match - called by ucfg to check for WPA match
  * wlan_crypto_check_rsn_match - called by ucfg to check for WPA match
@@ -698,6 +700,7 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
  * @vdev_id: vdev id
  * @vdev_id: vdev id
  * @ie_ptr: pointer to IEs
  * @ie_ptr: pointer to IEs
  * @ie_len: IE length
  * @ie_len: IE length
+ * @peer_crypto_params: return peer crypto parameters
  *
  *
  * This function gets called from ucfg to check WPA match.
  * This function gets called from ucfg to check WPA match.
  *
  *
@@ -705,7 +708,8 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
  */
  */
 bool wlan_crypto_check_wpa_match(struct wlan_objmgr_psoc *psoc,
 bool wlan_crypto_check_wpa_match(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vedv_id, uint8_t *ie_ptr,
 				 uint8_t vedv_id, uint8_t *ie_ptr,
-				 uint16_t ie_len);
+				 uint16_t ie_len, struct wlan_crypto_params *
+				 peer_crypto_params);
 
 
 /**
 /**
  * wlan_set_vdev_crypto_prarams_from_ie - Sets vdev crypto params from IE info
  * wlan_set_vdev_crypto_prarams_from_ie - Sets vdev crypto params from IE info

+ 12 - 8
umac/cmn_services/crypto/src/wlan_crypto_global_api.c

@@ -3919,6 +3919,7 @@ wlan_get_crypto_params_from_wpa_ie(struct wlan_crypto_params *crypto_params,
  * @vdev_id: vdev id
  * @vdev_id: vdev id
  * @ie_ptr: pointer to IEs
  * @ie_ptr: pointer to IEs
  * @ie_len: IE length
  * @ie_len: IE length
+ * @peer_crypto_params: return peer crypto parameters
  *
  *
  * This function gets called from ucfg to check RSN match.
  * This function gets called from ucfg to check RSN match.
  *
  *
@@ -3926,9 +3927,9 @@ wlan_get_crypto_params_from_wpa_ie(struct wlan_crypto_params *crypto_params,
  */
  */
 bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vdev_id, uint8_t *ie_ptr,
 				 uint8_t vdev_id, uint8_t *ie_ptr,
-				 uint16_t ie_len)
+				 uint16_t ie_len, struct wlan_crypto_params *
+				 peer_crypto_params)
 {
 {
-	struct wlan_crypto_params peer_crypto_params;
 	struct wlan_objmgr_vdev *vdev;
 	struct wlan_objmgr_vdev *vdev;
 	bool match = true;
 	bool match = true;
 	QDF_STATUS status;
 	QDF_STATUS status;
@@ -3937,7 +3938,7 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 		crypto_err("PSOC is NULL");
 		crypto_err("PSOC is NULL");
 		return false;
 		return false;
 	}
 	}
-	status = wlan_get_crypto_params_from_rsn_ie(&peer_crypto_params,
+	status = wlan_get_crypto_params_from_rsn_ie(peer_crypto_params,
 						    ie_ptr, ie_len);
 						    ie_ptr, ie_len);
 	if (QDF_STATUS_SUCCESS != status) {
 	if (QDF_STATUS_SUCCESS != status) {
 		crypto_err("get crypto prarams from RSN IE failed");
 		crypto_err("get crypto prarams from RSN IE failed");
@@ -3950,7 +3951,8 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 		return false;
 		return false;
 	}
 	}
 
 
-	match = wlan_crypto_rsn_info(vdev, &peer_crypto_params);
+	match = wlan_crypto_rsn_info(vdev, peer_crypto_params);
+
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_CRYPTO_ID);
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_CRYPTO_ID);
 
 
 	return match;
 	return match;
@@ -3962,6 +3964,7 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
  * @vdev_id: vdev id
  * @vdev_id: vdev id
  * @ie_ptr: pointer to IEs
  * @ie_ptr: pointer to IEs
  * @ie_len: IE length
  * @ie_len: IE length
+ * @peer_crypto_params: return peer crypto parameters
  *
  *
  * This function gets called from ucfg to check WPA match.
  * This function gets called from ucfg to check WPA match.
  *
  *
@@ -3969,9 +3972,9 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
  */
  */
 bool wlan_crypto_check_wpa_match(struct wlan_objmgr_psoc *psoc,
 bool wlan_crypto_check_wpa_match(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vdev_id, uint8_t *ie_ptr,
 				 uint8_t vdev_id, uint8_t *ie_ptr,
-				 uint16_t ie_len)
+				 uint16_t ie_len, struct wlan_crypto_params *
+				 peer_crypto_params)
 {
 {
-	struct wlan_crypto_params peer_crypto_params;
 	struct wlan_objmgr_vdev *vdev;
 	struct wlan_objmgr_vdev *vdev;
 	bool match = true;
 	bool match = true;
 	QDF_STATUS status;
 	QDF_STATUS status;
@@ -3987,14 +3990,15 @@ bool wlan_crypto_check_wpa_match(struct wlan_objmgr_psoc *psoc,
 		return false;
 		return false;
 	}
 	}
 
 
-	status = wlan_get_crypto_params_from_wpa_ie(&peer_crypto_params,
+	status = wlan_get_crypto_params_from_wpa_ie(peer_crypto_params,
 						    ie_ptr, ie_len);
 						    ie_ptr, ie_len);
 	if (QDF_STATUS_SUCCESS != status) {
 	if (QDF_STATUS_SUCCESS != status) {
 		crypto_err("get crypto prarams from WPA IE failed");
 		crypto_err("get crypto prarams from WPA IE failed");
 		match = false;
 		match = false;
 		goto send_res;
 		goto send_res;
 	}
 	}
-	match = wlan_crypto_rsn_info(vdev, &peer_crypto_params);
+	match = wlan_crypto_rsn_info(vdev, peer_crypto_params);
+
 send_res:
 send_res:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_CRYPTO_ID);
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_CRYPTO_ID);