diff --git a/qcwcn/wifi_hal/nan_i.h b/qcwcn/wifi_hal/nan_i.h
index 7202751..b0b33eb 100644
--- a/qcwcn/wifi_hal/nan_i.h
+++ b/qcwcn/wifi_hal/nan_i.h
@@ -347,7 +347,7 @@
 {
     u16 ttl;
     u16 period;
-    u32 reserved:1;
+    u32 replyIndFlag:1;
     u32 publishType:2;
     u32 txType:1;
     u32 rssiThresholdFlag:1;
@@ -407,6 +407,27 @@
     u16 reserved;
 } NanPublishTerminatedIndMsg, *pNanPublishTerminatedIndMsg;
 
+/* Params for NAN Publish Replied Ind */
+typedef struct PACKED
+{
+  u32  matchHandle;
+} NanPublishRepliedIndParams;
+
+/* NAN Publish Replied Ind */
+typedef struct PACKED
+{
+    NanMsgHeader fwHeader;
+    NanPublishRepliedIndParams publishRepliedIndParams;
+    /*
+     * Excludes TLVs
+     *
+     * Required: MAC Address
+     * Optional: Received RSSI Value
+     *
+     */
+    u8 ptlv[];
+} NanPublishRepliedIndMsg, *pNanPublishRepliedIndMsg;
+
 /* NAN Subscribe Service Req */
 typedef struct PACKED
 {
@@ -974,6 +995,7 @@
   Definition of various NanIndication(events)
 */
 typedef enum {
+    NAN_INDICATION_PUBLISH_REPLIED         =0,
     NAN_INDICATION_PUBLISH_TERMINATED      =1,
     NAN_INDICATION_MATCH                   =2,
     NAN_INDICATION_MATCH_EXPIRED           =3,
diff --git a/qcwcn/wifi_hal/nan_ind.cpp b/qcwcn/wifi_hal/nan_ind.cpp
index f2adf61..a57f228 100644
--- a/qcwcn/wifi_hal/nan_ind.cpp
+++ b/qcwcn/wifi_hal/nan_ind.cpp
@@ -35,6 +35,15 @@
 
     ALOGV("handleNanIndication msg_id:%u", msg_id);
     switch (msg_id) {
+    case NAN_INDICATION_PUBLISH_REPLIED:
+        NanPublishRepliedInd publishRepliedInd;
+        memset(&publishRepliedInd, 0, sizeof(publishRepliedInd));
+        res = getNanPublishReplied(&publishRepliedInd);
+        if (!res && mHandler.EventPublishReplied) {
+            (*mHandler.EventPublishReplied)(&publishRepliedInd);
+        }
+        break;
+
     case NAN_INDICATION_PUBLISH_TERMINATED:
         NanPublishTerminatedInd publishTerminatedInd;
         memset(&publishTerminatedInd, 0, sizeof(publishTerminatedInd));
@@ -165,7 +174,7 @@
 
     switch (pHeader->msgId) {
     case NAN_MSG_ID_PUBLISH_REPLIED_IND:
-        return NAN_INDICATION_UNKNOWN;
+        return NAN_INDICATION_PUBLISH_REPLIED;
     case NAN_MSG_ID_PUBLISH_TERMINATED_IND:
         return NAN_INDICATION_PUBLISH_TERMINATED;
     case NAN_MSG_ID_MATCH_IND:
@@ -195,6 +204,55 @@
     }
 }
 
+int NanCommand::getNanPublishReplied(NanPublishRepliedInd *event)
+{
+    if (event == NULL || mNanVendorEvent == NULL) {
+        ALOGE("%s: Invalid input argument event:%p mNanVendorEvent:%p",
+              __func__, event, mNanVendorEvent);
+        return WIFI_ERROR_INVALID_ARGS;
+    }
+
+    pNanPublishRepliedIndMsg pRsp = (pNanPublishRepliedIndMsg)mNanVendorEvent;
+    event->requestor_instance_id = pRsp->publishRepliedIndParams.matchHandle;
+
+    event->rssi_value = 0;
+    u8 *pInputTlv = pRsp->ptlv;
+    NanTlv outputTlv;
+    u16 readLen = 0;
+    int remainingLen = (mNanDataLen - \
+        (sizeof(NanMsgHeader)));
+
+    if (remainingLen <= 0) {
+        ALOGI("%s: No TLV's present",__func__);
+        return WIFI_SUCCESS;
+    }
+    while ((remainingLen > 0) &&
+           (0 != (readLen = NANTLV_ReadTlv(pInputTlv, &outputTlv)))) {
+        switch (outputTlv.type) {
+        case NAN_TLV_TYPE_MAC_ADDRESS:
+            if (outputTlv.length > sizeof(event->addr)) {
+                outputTlv.length = sizeof(event->addr);
+            }
+            memcpy(event->addr, outputTlv.value, outputTlv.length);
+            break;
+        case NAN_TLV_TYPE_RECEIVED_RSSI_VALUE:
+            if (outputTlv.length > sizeof(event->rssi_value)) {
+                outputTlv.length = sizeof(event->rssi_value);
+            }
+            memcpy(&event->rssi_value, outputTlv.value,
+                   outputTlv.length);
+            break;
+        default:
+            ALOGI("Unknown TLV type skipped");
+            break;
+        }
+        remainingLen -= readLen;
+        pInputTlv += readLen;
+        memset(&outputTlv, 0, sizeof(outputTlv));
+    }
+    return WIFI_SUCCESS;
+}
+
 int NanCommand::getNanPublishTerminated(NanPublishTerminatedInd *event)
 {
     if (event == NULL || mNanVendorEvent == NULL) {
diff --git a/qcwcn/wifi_hal/nan_req.cpp b/qcwcn/wifi_hal/nan_req.cpp
index 2868ffb..00a1a3b 100644
--- a/qcwcn/wifi_hal/nan_req.cpp
+++ b/qcwcn/wifi_hal/nan_req.cpp
@@ -610,7 +610,8 @@
 
     pFwReq->publishServiceReqParams.ttl = pReq->ttl;
     pFwReq->publishServiceReqParams.period = pReq->period;
-    pFwReq->publishServiceReqParams.reserved = 0;
+    pFwReq->publishServiceReqParams.replyIndFlag =
+                                   (pReq->recv_indication_cfg & BIT_3) ? 0 : 1;
     pFwReq->publishServiceReqParams.publishType = pReq->publish_type;
     pFwReq->publishServiceReqParams.txType = pReq->tx_type;
 
diff --git a/qcwcn/wifi_hal/nancommand.h b/qcwcn/wifi_hal/nancommand.h
index 6b2624f..763544f 100644
--- a/qcwcn/wifi_hal/nancommand.h
+++ b/qcwcn/wifi_hal/nancommand.h
@@ -46,6 +46,7 @@
     //based on the indication type
     int handleNanIndication();
     //Various Functions to get the appropriate indications
+    int getNanPublishReplied(NanPublishRepliedInd *event);
     int getNanPublishTerminated(NanPublishTerminatedInd *event);
     int getNanMatch(NanMatchInd *event);
     int getNanMatchExpired(NanMatchExpiredInd *event);
