From a44fa15cb1cdc23a33d7e1098244634e358ac598 Mon Sep 17 00:00:00 2001 From: Ajit Vaishya Date: Tue, 15 Feb 2022 21:54:31 +0530 Subject: [PATCH] Define a vendor specific NDP attribute for NAN service id Add a NAN NDP attribute QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID which indicates service id with 6 bytes of length and it's derived from the SHA-256 hash of the NAN service name. As per Wi-Fi Aware Specfication version 3.2, this service ID is used to calculate the NAN PMK. Signed-off-by: Jouni Malinen --- src/common/qca-vendor.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 2b9162374..db5eb6bda 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -7360,6 +7360,14 @@ enum qca_wlan_vendor_attr_ndp_params { * 1:support 0:not support */ QCA_WLAN_VENDOR_ATTR_PEER_NDPE_SUPPORT = 30, + /* As per Wi-Fi Aware Specification v3.2 Service Id is the first + * 48 bits of the SHA-256 hash of the Service Name. + * A lower-case representation of the Service Name shall be used to + * calculate the Service ID. + * Array of u8: length is 6 bytes + * This attribute is used and optional for ndp indication. + */ + QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID = 31, /* keep last */ QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_AFTER_LAST,