Wifi-Hal:Add support for configuring NAN sid on subscriber side

Provide configuration support to set sid on the subscriber side sync and
discovery beacons as part of NAN enable and config request.

Bug: 35195516
Test: integrated (sl4a) scripts pass
CRs-Fixed: 2079318
Change-Id: Ic181ddc9146ba8cfbf6716ab8b303a5cd6a22b7c
diff --git a/qcwcn/wifi_hal/nan_i.h b/qcwcn/wifi_hal/nan_i.h
index b0b33eb..ae182bb 100644
--- a/qcwcn/wifi_hal/nan_i.h
+++ b/qcwcn/wifi_hal/nan_i.h
@@ -211,6 +211,7 @@
     NAN_TLV_TYPE_5G_CHANNEL,
     NAN_TLV_TYPE_DISC_MAC_ADDR_RANDOM_INTERVAL,
     NAN_TLV_TYPE_RANGING_AUTO_RESPONSE_CFG = 4134,
+    NAN_TLV_TYPE_SUBSCRIBE_SID_BEACON = 4135,
     NAN_TLV_TYPE_CONFIG_LAST = 8191,
 
     /* Attributes types */
diff --git a/qcwcn/wifi_hal/nan_req.cpp b/qcwcn/wifi_hal/nan_req.cpp
index 00a1a3b..5a634ed 100644
--- a/qcwcn/wifi_hal/nan_req.cpp
+++ b/qcwcn/wifi_hal/nan_req.cpp
@@ -138,7 +138,11 @@
         (
            pReq->discovery_indication_cfg ? (SIZEOF_TLV_HDR + \
            sizeof(u32)) : 0 \
-        );
+        ) + \
+        (
+          pReq->config_subscribe_sid_beacon ? (SIZEOF_TLV_HDR + \
+          sizeof(pReq->subscribe_sid_beacon_val)) : 0 \
+        ) ;
     pNanEnableReqMsg pFwReq = (pNanEnableReqMsg)malloc(message_len);
     if (pFwReq == NULL) {
         cleanup();
@@ -300,6 +304,11 @@
                       sizeof(u32),
                       (const u8*)&discovery_indications, tlvs);
     }
+    if (pReq->config_subscribe_sid_beacon) {
+        tlvs = addTlv(NAN_TLV_TYPE_SUBSCRIBE_SID_BEACON,
+                      sizeof(pReq->subscribe_sid_beacon_val),
+                      (const u8*)&pReq->subscribe_sid_beacon_val, tlvs);
+    }
 
     mVendorData = (char*)pFwReq;
     mDataLen = message_len;
@@ -416,7 +425,11 @@
         (
            pReq->discovery_indication_cfg ? (SIZEOF_TLV_HDR + \
            sizeof(u32)) : 0 \
-        );
+        ) + \
+        (
+          pReq->config_subscribe_sid_beacon ? (SIZEOF_TLV_HDR + \
+          sizeof(pReq->subscribe_sid_beacon_val)) : 0 \
+        ) ;
 
     if (pReq->num_config_discovery_attr) {
         for (idx = 0; idx < pReq->num_config_discovery_attr; idx ++) {
@@ -538,6 +551,11 @@
                       sizeof(u32),
                       (const u8*)&discovery_indications, tlvs);
     }
+    if (pReq->config_subscribe_sid_beacon) {
+        tlvs = addTlv(NAN_TLV_TYPE_SUBSCRIBE_SID_BEACON,
+                      sizeof(pReq->subscribe_sid_beacon_val),
+                      (const u8*)&pReq->subscribe_sid_beacon_val, tlvs);
+    }
 
     mVendorData = (char*)pFwReq;
     mDataLen = message_len;