diff options
author | Rakesh Sunki <rsunki@codeaurora.org> | 2017-04-05 15:53:31 -0700 |
---|---|---|
committer | Amarnath Hullur Subramanyam <amarnath@codeaurora.org> | 2017-07-24 06:33:54 -0700 |
commit | aa7b135ee5ebfd4ab45af29112e356b67ed88e9f (patch) | |
tree | a07e03d826c78b860498b630951bed42e9212285 | |
parent | d02b26a70d6b1879498ca98e0803aaa3beacd013 (diff) | |
download | android_hardware_qcom_wlan-aa7b135ee5ebfd4ab45af29112e356b67ed88e9f.tar.gz android_hardware_qcom_wlan-aa7b135ee5ebfd4ab45af29112e356b67ed88e9f.tar.bz2 android_hardware_qcom_wlan-aa7b135ee5ebfd4ab45af29112e356b67ed88e9f.zip |
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
-rw-r--r-- | qcwcn/wifi_hal/nan_i.h | 1 | ||||
-rw-r--r-- | qcwcn/wifi_hal/nan_req.cpp | 22 |
2 files changed, 21 insertions, 2 deletions
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 @@ typedef enum 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 @@ int NanCommand::putNanEnable(transaction_id id, const NanEnableRequest *pReq) ( 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 @@ int NanCommand::putNanEnable(transaction_id id, const NanEnableRequest *pReq) 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 @@ int NanCommand::putNanConfig(transaction_id id, const NanConfigRequest *pReq) ( 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 @@ int NanCommand::putNanConfig(transaction_id id, const NanConfigRequest *pReq) 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; |