From: Jaya Prakash Sangaru Date: Wed, 25 Sep 2019 17:17:45 +0000 (+0530) Subject: [APR-2987]wlbt: NAN R2 fix NDP terminate X-Git-Tag: MMI-RSA31.Q1-48-36-11~6^2^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4824d72ae0cad348a2ca000728a6f480ed52060;p=GitHub%2FMotorolaMobilityLLC%2Fhardware-samsung_slsi-scsc_wifibt-wifi_hal.git [APR-2987]wlbt: NAN R2 fix NDP terminate Fixed NDP terminate request to include correct number of NDP ids. Change-Id: I033492248d9588c82f0aab91242c6f2b4195639a SCSC-Bug-Id: HOST-11012 Signed-off-by: Jaya Prakash Sangaru --- diff --git a/wifi_nan.cpp b/wifi_nan.cpp index 86e7414..5e1ac12 100755 --- a/wifi_nan.cpp +++ b/wifi_nan.cpp @@ -1280,7 +1280,7 @@ public: int id = event.get_vendor_id(); int subcmd = event.get_vendor_subcmd(); - ALOGI("NAN %s Id = %0x, subcmd = %d", __func__, id, subcmd); + ALOGI("NAN %s Id = 0x%x, subcmd = 0x%x", __func__, id, subcmd); switch(subcmd) { case SLSI_NAN_EVENT_MATCH: @@ -1378,7 +1378,7 @@ public: int result; WifiRequest request(familyId(), ifaceId()); - ALOGI("NAN DATA-PATH req subcmd:%d transaction_id:%d", subcmd, id); + ALOGI("NAN DATA-PATH req subcmd:0x%x transaction_id:%d", subcmd, id); result = datacmd.getDataPathNLMsg(id, data, subcmd, request); if (result != WIFI_SUCCESS) { @@ -1390,7 +1390,7 @@ public: unregisterNanEvents(); } else { datacmd.requestSuccess(id, data, subcmd); - ALOGD("NAN DATA-PATH req(subcmd:%d)...success", subcmd); + ALOGD("NAN DATA-PATH req(subcmd:0x%x)...success", subcmd); } return result; } diff --git a/wifi_nan_data_path.cpp b/wifi_nan_data_path.cpp index dae84e1..a5a31bf 100755 --- a/wifi_nan_data_path.cpp +++ b/wifi_nan_data_path.cpp @@ -132,11 +132,11 @@ int NanDataCommand::dataEnd(NanDataPathEndRequest* msg, WifiRequest &request) { nlattr *data = newNlVendorMsg(SLSI_NL80211_VENDOR_SUBCMD_NAN_DATA_END, request); if (!data) return WIFI_ERROR_UNKNOWN; - - for(i=0; inum_ndp_instances; i++) { result = request.put_u32(NAN_REQ_ATTR_NDP_INSTANCE_ID, msg->ndp_instance_id[i]); CHECK_WIFI_STATUS_RETURN_FAIL(result, "Failed to put ndp_instance_id"); } + request.attr_end(data); return result; } @@ -320,7 +320,7 @@ int NanDataCommand::getDataPathNLMsg(u16 id, void *data, int subcmd, WifiRequest transaction_id[idx_ndp_end] = id; return dataEnd((NanDataPathEndRequest *)data, request); default: - ALOGE("unknown subcmd :%d", subcmd); + ALOGE("unknown subcmd :0x%x", subcmd); } return WIFI_ERROR_UNKNOWN; }