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:
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) {
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;
}
nlattr *data = newNlVendorMsg(SLSI_NL80211_VENDOR_SUBCMD_NAN_DATA_END, request);
if (!data)
return WIFI_ERROR_UNKNOWN;
-
- for(i=0; i<SLSI_NAN_MAX_NDP; i++) {
+ for(i=0; i<msg->num_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;
}
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;
}