BAL and Maple Release 2.2

Signed-off-by: Shad Ansari <developer@Carbon.local>
diff --git a/bcm68620_release/release/host_driver/api/bcmolt_msg.c b/bcm68620_release/release/host_driver/api/bcmolt_msg.c
new file mode 100644
index 0000000..56e3961
--- /dev/null
+++ b/bcm68620_release/release/host_driver/api/bcmolt_msg.c
@@ -0,0 +1,55 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+#include <bcmos_system.h>
+#include <bcm_dev_log.h>
+#include "bcmolt_msg.h"
+
+bcmos_errno bcmolt_msg_err(bcmolt_msg *msg, dev_log_id log_id, bcmos_errno err, uint16_t err_field_idx, const char *fmt, ...)
+{
+    msg->err = err;
+    msg->err_field_idx = err_field_idx;
+    if (fmt)
+    {
+        va_list args;
+
+        va_start(args, fmt);
+        vsnprintf(msg->err_text, sizeof(msg->err_text) - 1, fmt, args);
+        va_end(args);
+        strncat(msg->err_text, "\n", 1);
+#ifdef ENABLE_LOG
+        if (log_id && log_id != DEV_LOG_INVALID_ID)
+            bcm_dev_log_log(log_id, DEV_LOG_LEVEL_ERROR, BCM_LOG_FLAG_CALLER_FMT, "%s", msg->err_text);
+#endif
+    }
+    else
+    {
+        msg->err_text[0] = 0;
+    }
+    return err;
+}