Browse Source

qcacmn: Add mcast SW encrypt decrypt feature

For SW encap and decap support, need to change API
to support group key
Change-Id: I340b269d8b8be3e5018b69cb9c74b7671817d73c
Keyur Parekh 7 years ago
parent
commit
413868686d

+ 1 - 1
umac/cmn_services/crypto/inc/wlan_crypto_global_def.h

@@ -264,7 +264,7 @@ struct wlan_crypto_req_key {
 	uint8_t    pad;
 	uint16_t   keyix;
 	uint8_t    keylen;
-	uint8_t    flags;
+	uint16_t    flags;
 	uint8_t    macaddr[QDF_MAC_ADDR_SIZE];
 	uint64_t   keyrsc;
 	uint64_t   keytsc;

+ 3 - 3
umac/cmn_services/crypto/src/wlan_crypto_global_api.c

@@ -360,7 +360,7 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	isbcast = qdf_is_macaddr_broadcast(
+	isbcast = qdf_is_macaddr_group(
 				(struct qdf_mac_addr *)req_key->macaddr);
 	if ((req_key->keylen == 0) && !IS_FILS_CIPHER(req_key->type)) {
 		/* zero length keys, only set default key id if flags are set*/
@@ -1074,7 +1074,7 @@ QDF_STATUS wlan_crypto_encap(struct wlan_objmgr_vdev *vdev,
 	if (peer)
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 
-	if (qdf_is_macaddr_broadcast((struct qdf_mac_addr *)mac_addr)) {
+	if (qdf_is_macaddr_group((struct qdf_mac_addr *)mac_addr)) {
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
@@ -1179,7 +1179,7 @@ QDF_STATUS wlan_crypto_decap(struct wlan_objmgr_vdev *vdev,
 	if (peer)
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 
-	if (qdf_is_macaddr_broadcast((struct qdf_mac_addr *)mac_addr)) {
+	if (qdf_is_macaddr_group((struct qdf_mac_addr *)mac_addr)) {
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {