From 6ed6d0a4b576837685c19fb1602472edaaa1bc07 Mon Sep 17 00:00:00 2001 From: Jonathon Fitch Date: Wed, 28 Sep 2016 23:18:28 +0100 Subject: [PATCH] Fix some compile errors --- drivers/misc/mediatek/conn_md/conn_md.c | 543 ++++++++++++++++++ drivers/misc/mediatek/conn_md/conn_md_dbg.c | 157 +++++ drivers/misc/mediatek/conn_md/conn_md_dev.c | 0 drivers/misc/mediatek/conn_md/conn_md_dump.c | 153 +++++ drivers/misc/mediatek/conn_md/conn_md_exp.c | 52 ++ drivers/misc/mediatek/conn_md/conn_md_log.c | 52 ++ drivers/misc/mediatek/conn_md/conn_md_test.c | 141 +++++ .../connectivity/wlan/gen2/include/config.h | 7 +- .../wlan/gen2/include/nic_cmd_event.h | 25 +- drivers/misc/mediatek/eccci/ccci_core.h | 3 +- drivers/misc/mediatek/ext_disp/extd_factory.c | 2 +- .../mediatek/ext_disp/extd_multi_control.c | 2 +- 12 files changed, 1131 insertions(+), 6 deletions(-) create mode 100644 drivers/misc/mediatek/conn_md/conn_md.c create mode 100644 drivers/misc/mediatek/conn_md/conn_md_dbg.c create mode 100644 drivers/misc/mediatek/conn_md/conn_md_dev.c create mode 100644 drivers/misc/mediatek/conn_md/conn_md_dump.c create mode 100644 drivers/misc/mediatek/conn_md/conn_md_exp.c create mode 100644 drivers/misc/mediatek/conn_md/conn_md_log.c create mode 100644 drivers/misc/mediatek/conn_md/conn_md_test.c diff --git a/drivers/misc/mediatek/conn_md/conn_md.c b/drivers/misc/mediatek/conn_md/conn_md.c new file mode 100644 index 000000000000..67932accb707 --- /dev/null +++ b/drivers/misc/mediatek/conn_md/conn_md.c @@ -0,0 +1,543 @@ + +#include "conn_md.h" +#include "conn_md_dbg.h" + +/*global data structure defination*/ + +CONN_MD_STRUCT g_conn_md; + +static int _conn_md_del_msg_by_uid(uint32 u_id); +static int conn_md_dmp_msg(P_CONN_MD_QUEUE p_msg_list, uint32 src_id, uint32 dst_id); + +int conn_md_add_user(uint32 u_id, CONN_MD_BRIDGE_OPS *p_ops) +{ + P_CONN_MD_USER p_user = NULL; + struct list_head *pos = NULL; + P_CONN_MD_STRUCT p_conn_md = &g_conn_md; + P_CONN_MD_USER_LIST p_user_list = &p_conn_md->user_list; + + /*lock user_list_lock */ + mutex_lock(&p_user_list->lock); + + /*check if earlier uid reged or not */ + list_for_each(pos, &p_user_list->list) { + p_user = container_of(pos, CONN_MD_USER, entry); + if (p_user->u_id == u_id) { + /*if yes */ + /*print warning information */ + CONN_MD_WARN_FUNC("uid (0x%08x) is already registered, updating with newer one\n", u_id); + break; + } + p_user = NULL; + } + + if (NULL == p_user) { + /*memory allocation for user information */ + p_user = kmalloc(sizeof(CONN_MD_USER), GFP_ATOMIC); + INIT_LIST_HEAD(&p_user->entry); + list_add_tail(&p_user->entry, &p_user_list->list); + p_user->u_id = u_id; + p_user->state = USER_REGED; + } + + /*anyway, write user info to target uid */ + memcpy(&p_user->ops, p_ops, sizeof(CONN_MD_BRIDGE_OPS)); + + p_user->state = USER_ENABLED; + /*unlock user_list lock */ + mutex_unlock(&p_user_list->lock); + + CONN_MD_WARN_FUNC("uid (0x%08x) is added to user list successfully\n", p_user->u_id); + + return 0; +} + +int conn_md_del_user(uint32 u_id) +{ + int i_ret = -1; + P_CONN_MD_USER p_user = NULL; + struct list_head *pos = NULL; + P_CONN_MD_STRUCT p_conn_md = &g_conn_md; + P_CONN_MD_USER_LIST p_user_list = &p_conn_md->user_list; + + /*lock user_list_lock */ + mutex_lock(&p_user_list->lock); + + /*check if earlier uid reged or not */ + list_for_each(pos, &p_user_list->list) { + p_user = container_of(pos, CONN_MD_USER, entry); + if (p_user->u_id == u_id) { + /*if yes */ + /*print information */ + CONN_MD_INFO_FUNC("uid (0x%08x) is registered, delete it\n", u_id); + break; + } + p_user = NULL; + } + + if (NULL == p_user) { + i_ret = CONN_MD_ERR_INVALID_PARAM; + /*print warning information */ + CONN_MD_WARN_FUNC("uid (0x%08x) not found in user list..\n", u_id); + } else { + /*delete user info from user info list of target uid */ + list_del(pos); + kfree(p_user); + p_user_list->counter--; + CONN_MD_INFO_FUNC("uid (0x%08x) is deleted\n", u_id); + i_ret = 0; + } + + /*unlock user_list lock */ + mutex_unlock(&p_user_list->lock); + + /*search all message enquued in p_msg_list and delete them before delete user */ + _conn_md_del_msg_by_uid(u_id); + + return i_ret; +} + +int conn_md_dmp_msg(P_CONN_MD_QUEUE p_msg_list, uint32 src_id, uint32 dst_id) +{ +#define MAX_LENGTH_PER_PACKAGE 8 + + struct list_head *pos = NULL; + P_CONN_MD_MSG p_msg = NULL; + int i = 0; + int counter = 0; + + if (NULL == p_msg_list) { + CONN_MD_ERR_FUNC("invalid parameter, p_msg_list:0x%08x\n", p_msg_list); + return CONN_MD_ERR_INVALID_PARAM; + } + + mutex_lock(&p_msg_list->lock); + + list_for_each(pos, &p_msg_list->list) { + p_msg = container_of(pos, CONN_MD_MSG, entry); + if (((0 == src_id) || (src_id == p_msg->ilm.src_mod_id)) && + ((0 == dst_id) || (dst_id == p_msg->ilm.dest_mod_id))) { + counter++; + CONN_MD_INFO_FUNC + ("p_msg:0x%08x, src_id:0x%08x, dest_id:0x%08x, msg_len:%d\n", p_msg, + p_msg->ilm.src_mod_id, p_msg->ilm.dest_mod_id, p_msg->local_para.msg_len); + for (i = 0; (i < p_msg->local_para.msg_len) && (i < MAX_LENGTH_PER_PACKAGE); i++) { + CONN_MD_INFO_FUNC("%02x ", p_msg->local_para.data[i]); + if (7 == (i % 8)) + CONN_MD_INFO_FUNC("\n"); + } + CONN_MD_INFO_FUNC("\n"); + } + } + + mutex_unlock(&p_msg_list->lock); + + CONN_MD_INFO_FUNC("%d messages found in message list\n", counter); + return 0; +} + +int _conn_md_del_msg_by_uid(uint32 u_id) +{ + /*only delete messaged enqueued in queue list, do not care message in active queue list */ + P_CONN_MD_STRUCT p_conn_md = &g_conn_md; + P_CONN_MD_QUEUE p_msg_list = &p_conn_md->msg_queue; + struct list_head *pos = NULL; + P_CONN_MD_MSG p_msg = NULL; + int flag = 1; + + CONN_MD_TRC_FUNC(); + mutex_lock(&p_msg_list->lock); + while (flag) { + /*set flat to 0 before search message */ + flag = 0; + + list_for_each(pos, &p_msg_list->list) { + p_msg = container_of(pos, CONN_MD_MSG, entry); + if ((p_msg->ilm.dest_mod_id == u_id) || (p_msg->ilm.src_mod_id == u_id)) { + flag = 1; + CONN_MD_DBG_FUNC + ("message for uid(0x%08x) found in queue list, dest_id(0x%08x), src_id(0x%08x)\n", + u_id, p_msg->ilm.dest_mod_id, p_msg->ilm.src_mod_id); + break; + } + } + + if (1 == flag) { + p_msg_list->counter--; + list_del(pos); + kfree(p_msg); + CONN_MD_DBG_FUNC("dequeued in queue list, counter:%d\n", p_msg_list->counter); + } + + } + mutex_unlock(&p_msg_list->lock); + CONN_MD_TRC_FUNC(); + return 0; +} + +int conn_md_send_msg(ipc_ilm_t *ilm) +{ + + P_CONN_MD_STRUCT p_conn_md = &g_conn_md; + P_CONN_MD_QUEUE p_msg_list = &p_conn_md->msg_queue; + uint32 msg_str_len = 0; + local_para_struct *p_local_para = NULL; + P_CONN_MD_MSG p_new_msg = NULL; + uint32 msg_info_len = ilm->local_para_ptr->msg_len; + + CONN_MD_DBG_FUNC("ilm:0x%08x, msg_len:%d\n", ilm, ilm->local_para_ptr->msg_len); + + /*malloc message structure for this msg */ + msg_str_len = sizeof(CONN_MD_MSG) + msg_info_len; + p_new_msg = kmalloc(msg_str_len, GFP_ATOMIC); + + if (NULL != p_new_msg) { + CONN_MD_DBG_FUNC("p_new_msg:0x%08x\n", p_new_msg); + /*copy message from ilm */ + memcpy(p_new_msg, ilm, sizeof(ipc_ilm_t)); + + p_local_para = &p_new_msg->local_para; + p_new_msg->ilm.local_para_ptr = p_local_para; + /*copy local_para_ptr structure */ + memcpy(p_local_para, ilm->local_para_ptr, sizeof(local_para_struct)); + /*copy data from local_para_ptr structure */ + memcpy(p_local_para->data, ilm->local_para_ptr->data, msg_info_len); + + CONN_MD_DBG_FUNC("p_local_para:0x%08x, msg_len:%d\n", p_local_para, p_local_para->msg_len); + + INIT_LIST_HEAD(&p_new_msg->entry); + + /*lock tx queue lock */ + mutex_lock(&p_msg_list->lock); + /*enqueue tx message */ + list_add_tail(&p_new_msg->entry, &p_msg_list->list); + + p_msg_list->counter++; + + /*unlock queue lock */ + mutex_unlock(&p_msg_list->lock); + + CONN_MD_DBG_FUNC + ("enqueue new message to msg queue list succeed, enqueued msg counter:%d\n", p_msg_list->counter); + + conn_md_dmp_in(ilm, MSG_ENQUEUE, p_conn_md->p_msg_dmp_sys); + + CONN_MD_DBG_FUNC("begin to wake up conn-md-thread\n"); + + /*wakeup conn-md thread to handle tx message */ + complete(&p_conn_md->tx_comp); + + CONN_MD_DBG_FUNC("wake up conn-md-thread done\n"); + } else { + CONN_MD_ERR_FUNC("kmalloc for new message structure failed\n"); + } + + return 0; +} + +#define ACT_QUEUE_DBG 0 + +static int conn_md_thread(void *p_data) +{ + P_CONN_MD_STRUCT p_conn_md = (P_CONN_MD_STRUCT) p_data; + P_CONN_MD_QUEUE p_act_queue = &p_conn_md->act_queue; + P_CONN_MD_QUEUE p_msg_queue = &p_conn_md->msg_queue; + struct list_head *pos = NULL; + P_CONN_MD_MSG p_msg = NULL; + P_CONN_MD_USER p_user = NULL; + struct list_head *p_user_pos = NULL; + P_CONN_MD_USER_LIST p_user_list = &p_conn_md->user_list; + ipc_ilm_t *p_cur_ilm = NULL; + + while (1) { + wait_for_completion_interruptible(&p_conn_md->tx_comp); + + if (kthread_should_stop()) { + CONN_MD_WARN_FUNC("conn-md-thread stoping ...\n"); + break; + } + + /*check if p_conn_md->msg_queue is empty or not */ + mutex_lock(&p_msg_queue->lock); + if (!list_empty(&p_msg_queue->list)) { + /*if not empty, remove all list structure to list of p_conn_md->act_queue */ + mutex_lock(&p_act_queue->lock); + if (!list_empty(&p_act_queue->list)) { + /*warning message, this should never happen!!! */ + CONN_MD_ERR_FUNC + ("p_act_queue list is not empty, this should never happen!!!---*?*---!!!\n"); + } + + /*ignore case of p_act_queue is not empty */ + list_replace_init(&p_msg_queue->list, &p_act_queue->list); + + mutex_unlock(&p_act_queue->lock); + + } else { + /*warning message */ + CONN_MD_DBG_FUNC("no msg queued in msg queue...\n"); + } + mutex_unlock(&p_msg_queue->lock); + + mutex_lock(&p_act_queue->lock); + /*dequeue from p_act_queue */ + list_for_each(pos, &p_act_queue->list) { + p_msg = container_of(pos, CONN_MD_MSG, entry); + p_cur_ilm = &p_msg->ilm; + if (NULL == p_cur_ilm) { +#if (ACT_QUEUE_DBG == 1) + /*free message structure */ + list_del(pos); + kfree(p_msg); + + p_act_queue->counter++; + CONN_MD_DBG_FUNC("dequeued in act queue counter:%d\n", p_act_queue->counter); +#endif + continue; + } + + conn_md_dmp_in(p_cur_ilm, MSG_DEQUEUE, p_conn_md->p_msg_dmp_sys); + + mutex_lock(&p_user_list->lock); + + /*check if src module is enabled or not */ + list_for_each(p_user_pos, &p_user_list->list) { + p_user = container_of(p_user_pos, CONN_MD_USER, entry); + if (p_user->u_id == p_cur_ilm->src_mod_id && p_user->state == USER_ENABLED) { + /*src module id is enabled already */ + CONN_MD_DBG_FUNC("source user id (0x%08x) found\n", p_cur_ilm->src_mod_id); + break; + } + p_user = NULL; + } + + if (NULL == p_user) { + mutex_unlock(&p_user_list->lock); + CONN_MD_WARN_FUNC + ("source user id (0x%08x) is not registered or not enabled yet, drop ilm msg\n", + p_cur_ilm->src_mod_id); +#if (ACT_QUEUE_DBG == 1) + /*free message structure */ + list_del(pos); + kfree(p_msg); + p_act_queue->counter++; + CONN_MD_DBG_FUNC("dequeued in act queue counter:%d\n", p_act_queue->counter); +#endif + + continue; + } + + /*check if destination module is enabled or not */ + list_for_each(p_user_pos, &p_user_list->list) { + p_user = container_of(p_user_pos, CONN_MD_USER, entry); + if (p_user->u_id == p_cur_ilm->dest_mod_id && p_user->state == USER_ENABLED) { + CONN_MD_DBG_FUNC("target user id (0x%08x) found\n", p_cur_ilm->dest_mod_id); + /*src module id is enabled already */ + break; + } + p_user = NULL; + } + + if (NULL == p_user) { + mutex_unlock(&p_user_list->lock); + + CONN_MD_WARN_FUNC + ("target user id (0x%08x) is not registered or enabled yet, drop ilm msg\n", + p_cur_ilm->dest_mod_id); +#if (ACT_QUEUE_DBG == 1) + /*free message structure */ + list_del(pos); + kfree(p_msg); + p_act_queue->counter++; + CONN_MD_DBG_FUNC("dequeued in act queue counter:%d\n", p_act_queue->counter); +#endif + continue; + } + CONN_MD_DBG_FUNC("p_cur_ilm:0x%08x, local_para_ptr:0x%08x, msg_len:%d\n", + p_cur_ilm, &p_cur_ilm->local_para_ptr, p_cur_ilm->local_para_ptr->msg_len); + CONN_MD_DBG_FUNC("sending message to user id (0x%08x)\n", p_cur_ilm->dest_mod_id); + /*send package to dest module by call corresponding rx callback function */ + (*(p_user->ops.rx_cb)) (p_cur_ilm); + CONN_MD_DBG_FUNC("message sent to user id (0x%08x) done\n", p_cur_ilm->dest_mod_id); + mutex_unlock(&p_user_list->lock); + +#if (ACT_QUEUE_DBG == 1) + /*free message structure */ + list_del(pos); + kfree(p_msg); + CONN_MD_DBG_FUNC("message structure freed\n"); + + p_act_queue->counter++; + CONN_MD_DBG_FUNC("dequeued in act queue counter:%d\n", p_act_queue->counter); +#endif + } + p_msg = NULL; + + while (!list_empty(&p_act_queue->list)) { + list_for_each(pos, &p_act_queue->list) { + p_msg = container_of(pos, CONN_MD_MSG, entry); + /*free message structure */ + list_del(pos); + kfree(p_msg); + p_msg = NULL; + CONN_MD_DBG_FUNC("message structure freed\n"); + + p_act_queue->counter++; + CONN_MD_DBG_FUNC("dequeued in act queue counter:%d\n", p_act_queue->counter); + break; + } + + } + + mutex_unlock(&p_act_queue->lock); + + } + CONN_MD_WARN_FUNC("conn-md-thread stopped.\n"); + return 0; +} + +int conn_md_dmp_msg_queued(uint32 src_id, uint32 dst_id) +{ + return conn_md_dmp_msg(&g_conn_md.msg_queue, src_id, dst_id); +} + +int conn_md_dmp_msg_active(uint32 src_id, uint32 dst_id) +{ + return conn_md_dmp_msg(&g_conn_md.act_queue, src_id, dst_id); +} + +int conn_md_dmp_msg_logged(uint32 src_id, uint32 dst_id) +{ + return conn_md_dmp_out(g_conn_md.p_msg_dmp_sys, src_id, dst_id); +} + +static int conn_md_init(void) +{ + int i_ret = -1; + P_CONN_MD_QUEUE p_queue = NULL; + P_CONN_MD_USER_LIST p_user_list = NULL; + + CONN_MD_TRC_FUNC(); + + /*init message queue structure */ + p_queue = &g_conn_md.msg_queue; + INIT_LIST_HEAD(&(p_queue->list)); + mutex_init(&(p_queue->lock)); + p_queue->counter = 0; + CONN_MD_INFO_FUNC("init message queue list succeed\n"); + + /*init active queue structure */ + p_queue = &g_conn_md.act_queue; + INIT_LIST_HEAD(&(p_queue->list)); + mutex_init(&(p_queue->lock)); + p_queue->counter = 0; + CONN_MD_INFO_FUNC("init active queue list succeed\n"); + + /*init user_list structure */ + p_user_list = &g_conn_md.user_list; + INIT_LIST_HEAD(&(p_user_list->list)); + mutex_init(&(p_user_list->lock)); + p_user_list->counter = 0; + CONN_MD_INFO_FUNC("init user information list succeed\n"); + + g_conn_md.p_msg_dmp_sys = conn_md_dmp_init(); + if (NULL == g_conn_md.p_msg_dmp_sys) + CONN_MD_WARN_FUNC("conn_md_dmp_init failed\n"); + else + CONN_MD_INFO_FUNC("conn_md_dmp_init succeed\n"); + /*init proc interface */ + conn_md_dbg_init(); + + /*create conn-md thread */ + + init_completion(&g_conn_md.tx_comp); + g_conn_md.p_task = kthread_create(conn_md_thread, &g_conn_md, "conn-md-thread"); + if (NULL == g_conn_md.p_task) { + CONN_MD_ERR_FUNC("create conn_md_thread fail\n"); + i_ret = -ENOMEM; + goto conn_md_err; + } + CONN_MD_INFO_FUNC("create conn_md_thread succeed, wakeup it\n"); + /*wakeup conn_md_thread */ + wake_up_process(g_conn_md.p_task); + +conn_md_err: + + CONN_MD_TRC_FUNC(); + return i_ret; +} + +static void conn_md_exit(void) +{ + + P_CONN_MD_STRUCT p_conn_md = &g_conn_md; + P_CONN_MD_QUEUE p_queue = NULL; + P_CONN_MD_USER_LIST p_user_list = &p_conn_md->user_list; + struct list_head *pos = NULL; + P_CONN_MD_USER p_user = NULL; + P_CONN_MD_MSG p_msg = NULL; + + CONN_MD_TRC_FUNC(); + + /*terminate conn-md thread */ + if (NULL != p_conn_md->p_task) { + CONN_MD_INFO_FUNC("signaling conn-md-thread to stop ...\n"); + kthread_stop(p_conn_md->p_task); + } + + /*delete user_list structure if user list is not empty */ + mutex_lock(&p_user_list->lock); + list_for_each(pos, &p_user_list->list) { + p_user = container_of(pos, CONN_MD_USER, entry); + list_del(pos); + kfree(p_user); + } + p_user_list->counter = 0; + mutex_unlock(&p_user_list->lock); + mutex_destroy(&p_user_list->lock); + + /*delete queue structure if message queue list is empty */ + p_queue = &p_conn_md->msg_queue; + mutex_lock(&p_queue->lock); + list_for_each(pos, &p_queue->list) { + p_msg = container_of(pos, CONN_MD_MSG, entry); + list_del(pos); + kfree(p_msg); + } + p_queue->counter = 0; + mutex_unlock(&p_queue->lock); + mutex_destroy(&p_queue->lock); + + /*delete queue structure if active queue list is empty */ + p_queue = &p_conn_md->act_queue; + mutex_lock(&p_queue->lock); + list_for_each(pos, &p_queue->list) { + p_msg = container_of(pos, CONN_MD_MSG, entry); + list_del(pos); + kfree(p_msg); + } + p_queue->counter = 0; + mutex_unlock(&p_queue->lock); + mutex_destroy(&p_queue->lock); + + if (NULL != p_conn_md->p_msg_dmp_sys) + conn_md_dmp_deinit(p_conn_md->p_msg_dmp_sys); + + CONN_MD_TRC_FUNC(); +} + +/*---------------------------------------------------------------------------*/ + +/* +module_init(conn_md_init); +module_exit(conn_md_exit); +*/ +subsys_initcall(conn_md_init); +module_exit(conn_md_exit); +/*---------------------------------------------------------------------------*/ + +MODULE_AUTHOR("MBJ/WCN/SE/SS1/Chaozhong.Liang"); +MODULE_DESCRIPTION("MTK CONN-MD Bridge Driver$1.0$"); +MODULE_LICENSE("GPL"); + +/*---------------------------------------------------------------------------*/ diff --git a/drivers/misc/mediatek/conn_md/conn_md_dbg.c b/drivers/misc/mediatek/conn_md/conn_md_dbg.c new file mode 100644 index 000000000000..56bead50115d --- /dev/null +++ b/drivers/misc/mediatek/conn_md/conn_md_dbg.c @@ -0,0 +1,157 @@ + +#define DFT_TAG "[CONN_MD_DMP]" +#include "conn_md_log.h" + +#include "conn_md_dbg.h" +#include "conn_md.h" +#include + + +#define USE_NEW_PROC_FS_FLAG 1 +#define CONN_MD_DBG_PROCNAME "driver/conn_md_dbg" + +static struct proc_dir_entry *gConnMdDbgEntry; + +#if USE_NEW_PROC_FS_FLAG +static const struct file_operations conn_md_dbg_fops = { + .read = conn_md_dbg_read, + .write = conn_md_dbg_write, +}; +#endif + +static int conn_md_test_dbg(int par1, int par2, int par3); +static int conn_md_dbg_set_log_lvl(int par1, int par2, int par3); +static int conn_md_dbg_dmp_msg_log(int par1, int par2, int par3); + +static const CONN_MD_DEV_DBG_FUNC conn_md_dbg_func[] = { + conn_md_test_dbg, + conn_md_dbg_set_log_lvl, + conn_md_dbg_dmp_msg_log, + NULL, +}; + +int conn_md_dbg_dmp_msg_log(int par1, int par2, int par3) +{ + return conn_md_dmp_msg_logged(par2, par3); +} + +int conn_md_dbg_set_log_lvl(int par1, int par2, int par3) +{ + return conn_md_log_set_lvl(par2); +} + +#if USE_NEW_PROC_FS_FLAG +ssize_t conn_md_dbg_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) +{ + return 0; +} +#else +static int conn_md_dbg_read(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + int len = 0; + + return len; +} +#endif + +#if USE_NEW_PROC_FS_FLAG +ssize_t conn_md_dbg_write(struct file *filp, const char __user *buffer, size_t count, loff_t *f_pos) +#else +static int conn_md_dbg_write(struct file *file, const char *buffer, unsigned long count, void *data) +#endif +{ + + char buf[256]; + char *pBuf; + unsigned long len = count; + long x = 0; + long y = 0; + long z = 0; + long i; + char *pToken = NULL; + char *pDelimiter = " \t"; + + CONN_MD_INFO_FUNC("write parameter len = %d\n\r", (int)len); + if (len >= sizeof(buf)) { + CONN_MD_ERR_FUNC("input handling fail!\n"); + len = sizeof(buf) - 1; + return -1; + } + + if (copy_from_user(buf, buffer, len)) + return -EFAULT; + buf[len] = '\0'; + CONN_MD_INFO_FUNC("write parameter data = %s\n\r", buf); + + pBuf = buf; + pToken = strsep(&pBuf, pDelimiter); + if (NULL != pToken) + i = kstrtol(pToken, 16, &x); + else + x = 0; + + pToken = strsep(&pBuf, "\t\n "); + if (NULL != pToken) + i = kstrtol(pToken, 16, &y); + else + y = 0; + + pToken = strsep(&pBuf, "\t\n "); + if (NULL != pToken) + i = kstrtol(pToken, 16, &z); + else + z = 0; + + CONN_MD_INFO_FUNC("x(0x%08x), y(0x%08x), z(0x%08x)\n\r", x, y, z); + + if (ARRAY_SIZE(conn_md_dbg_func) > x && NULL != conn_md_dbg_func[x]) + (*conn_md_dbg_func[x]) (x, y, z); + else + CONN_MD_WARN_FUNC("no handler defined for command id(0x%08x)\n\r", x); + return len; +} + +int conn_md_test_dbg(int par1, int par2, int par3) +{ + return conn_md_test(); +} + +int conn_md_dbg_init(void) +{ +#if USE_NEW_PROC_FS_FLAG + gConnMdDbgEntry = proc_create(CONN_MD_DBG_PROCNAME, 0664, NULL, &conn_md_dbg_fops); + if (gConnMdDbgEntry == NULL) { + CONN_MD_ERR_FUNC("Unable to create /proc entry\n\r"); + return -1; + } +#else + gConnMdDbgEntry = create_proc_entry(CONN_MD_DBG_PROCNAME, 0664, NULL); + if (gConnMdDbgEntry == NULL) { + CONN_MD_ERR_FUNC("Unable to create /proc entry\n\r"); + return -1; + } + + gConnMdDbgEntry->read_proc = conn_md_dbg_read; + gConnMdDbgEntry->write_proc = conn_md_dbg_write; +#endif + return 0; + +} + +int conn_md_dbg_deinit(void) +{ + +#if USE_NEW_PROC_FS_FLAG + if (NULL != gConnMdDbgEntry) + proc_remove(gConnMdDbgEntry); +#else + + if (gConnMdDbgEntry != NULL) { + remove_proc_entry(CONN_MD_DBG_PROCNAME, NULL); + return -1; + } +#endif + + return 0; + +} diff --git a/drivers/misc/mediatek/conn_md/conn_md_dev.c b/drivers/misc/mediatek/conn_md/conn_md_dev.c new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/drivers/misc/mediatek/conn_md/conn_md_dump.c b/drivers/misc/mediatek/conn_md/conn_md_dump.c new file mode 100644 index 000000000000..9606c6b4c96f --- /dev/null +++ b/drivers/misc/mediatek/conn_md/conn_md_dump.c @@ -0,0 +1,153 @@ + +#define DFT_TAG "[CONN_MD_DMP]" + +#include "conn_md_log.h" +#include "conn_md_dump.h" + +P_CONN_MD_DMP_MSG_LOG conn_md_dmp_init(void) +{ + uint32 msg_log_size = sizeof(CONN_MD_DMP_MSG_LOG); + P_CONN_MD_DMP_MSG_LOG p_msg_log = vmalloc(msg_log_size); + + if (NULL != p_msg_log) { + CONN_MD_INFO_FUNC("alloc memory for msg log system done, size:0x%08x\n", msg_log_size); + memset(p_msg_log, 0, msg_log_size); + + mutex_init(&p_msg_log->lock); + + } else { + CONN_MD_ERR_FUNC("alloc memory for msg log system failed\n"); + } + return p_msg_log; +} + +int conn_md_dmp_deinit(P_CONN_MD_DMP_MSG_LOG p_log) +{ + int i_ret = -1; + + if (NULL != p_log) { + CONN_MD_INFO_FUNC("valid log buffer pointer:0x%08x, free it.\n", p_log); + mutex_destroy(&p_log->lock); + vfree(p_log); + i_ret = 0; + } else { + CONN_MD_WARN_FUNC("invalid log buffer pointer\n"); + i_ret = CONN_MD_ERR_INVALID_PARAM; + } + return 0; +} + +int __conn_md_dmp_in(ipc_ilm_t *p_ilm, CONN_MD_MSG_TYPE msg_type, P_CONN_MD_DMP_MSG_LOG p_msg_log) +{ + struct timeval now; + P_CONN_MD_DMP_MSG_STR p_msg = NULL; + + /*get current time */ + do_gettimeofday(&now); + + mutex_lock(&p_msg_log->lock); + + p_msg = &p_msg_log->msg[p_msg_log->in]; + + /*Log timestamp */ + p_msg->sec = now.tv_sec; + p_msg->usec = now.tv_usec; + p_msg->type = msg_type; + + /*Log p_ilm */ + memcpy(&p_msg->ilm, p_ilm, sizeof(ipc_ilm_t)); + + /*Log msg length */ + p_msg->msg_len = p_ilm->local_para_ptr->msg_len; + + /*Log msg content */ + memcpy(&p_msg->data, p_ilm->local_para_ptr->data, + p_msg->msg_len > LENGTH_PER_PACKAGE ? LENGTH_PER_PACKAGE : p_msg->msg_len); + + /*update in size and index */ + + if (NUMBER_OF_MSG_LOGGED <= p_msg_log->size) + p_msg_log->size = NUMBER_OF_MSG_LOGGED; + else + p_msg_log->size++; + + p_msg_log->in++; + p_msg_log->in %= NUMBER_OF_MSG_LOGGED; + + mutex_unlock(&p_msg_log->lock); + CONN_MD_DBG_FUNC("msg type:%d enqueued succeed\n", msg_type); + return 0; +} + +int conn_md_dmp_in(ipc_ilm_t *p_ilm, CONN_MD_MSG_TYPE msg_type, P_CONN_MD_DMP_MSG_LOG p_msg_log) +{ + int i_ret = -1; + + if (NULL == p_ilm || + NULL == p_ilm->local_para_ptr || + 0 == p_ilm->local_para_ptr->msg_len || (msg_type != MSG_ENQUEUE && msg_type != MSG_DEQUEUE)) { + CONN_MD_WARN_FUNC("invalid parameter\n"); + i_ret = CONN_MD_ERR_INVALID_PARAM; + } else { + i_ret = __conn_md_dmp_in(p_ilm, msg_type, p_msg_log); + } + return i_ret; +} + +int __conn_md_dmp_msg_filter(P_CONN_MD_DMP_MSG_STR p_msg, uint32 src_id, uint32 dst_id) +{ + ipc_ilm_t *p_ilm = &p_msg->ilm; + int i = 0; + + if (((0 == src_id) || (src_id == p_ilm->src_mod_id)) && ((0 == dst_id) || (dst_id == p_ilm->dest_mod_id))) { + __conn_md_log_print(DFT_TAG + "%d.%d s, <%s> src_id:0x%08x, dst_id:0x%08x, msg_len:%d, dump_len:%d:\n", + p_msg->sec, p_msg->usec, + (MSG_ENQUEUE == p_msg->type ? "enqueue" : "dequeue"), + p_msg->ilm.src_mod_id, p_msg->ilm.dest_mod_id, p_msg->msg_len, + (LENGTH_PER_PACKAGE >= p_msg->msg_len ? p_msg->msg_len : LENGTH_PER_PACKAGE)); + + for (i = 0; (i < p_msg->msg_len) && (i < LENGTH_PER_PACKAGE); i++) { + __conn_md_log_print("%02x ", p_msg->data[i]); + if (7 == (i % 8)) + __conn_md_log_print("\n"); + } + __conn_md_log_print("\n"); + } + return 0; +} + +int conn_md_dmp_out(P_CONN_MD_DMP_MSG_LOG p_msg_log, uint32 src_id, uint32 dst_id) +{ + int i_ret = 0; + int size = 0; + int in = 0; + int out = 0; + P_CONN_MD_DMP_MSG_STR p_msg = NULL; + + + if (NULL == p_msg_log) { + CONN_MD_WARN_FUNC("invalid parameter, p_msg_log:0x%08x\n", p_msg_log); + return CONN_MD_ERR_INVALID_PARAM; + } + mutex_lock(&p_msg_log->lock); + size = p_msg_log->size; + mutex_unlock(&p_msg_log->lock); + CONN_MD_INFO_FUNC("dump msg for start\n", src_id, dst_id); + if (NUMBER_OF_MSG_LOGGED == size) + out = in; + else + out = 0; + + while (size--) { + p_msg = &p_msg_log->msg[out]; + + __conn_md_dmp_msg_filter(p_msg, src_id, dst_id); + + out++; + out %= NUMBER_OF_MSG_LOGGED; + } + mutex_unlock(&p_msg_log->lock); + CONN_MD_INFO_FUNC("dump msg for finished\n", src_id, dst_id); + return i_ret; +} diff --git a/drivers/misc/mediatek/conn_md/conn_md_exp.c b/drivers/misc/mediatek/conn_md/conn_md_exp.c new file mode 100644 index 000000000000..db359b0565a5 --- /dev/null +++ b/drivers/misc/mediatek/conn_md/conn_md_exp.c @@ -0,0 +1,52 @@ + +#define DFT_TAG "[CONN_MD_EXP]" + +#include "conn_md_exp.h" +#include "conn_md_log.h" + +#include "conn_md.h" + +int mtk_conn_md_bridge_reg(uint32 u_id, CONN_MD_BRIDGE_OPS *p_ops) +{ + + int i_ret = -1; + /*sanity check */ + if (NULL != p_ops && NULL != p_ops->rx_cb) { + /*add user */ + i_ret = conn_md_add_user(u_id, p_ops); + } else { + CONN_MD_ERR_FUNC("invalid parameter, u_id (0x%08x), p_ops(0x08x), rx_cb(0x%08x)\n", + u_id, p_ops, NULL == p_ops ? NULL : p_ops->rx_cb); + i_ret = CONN_MD_ERR_INVALID_PARAM; + } + + return i_ret; +} +EXPORT_SYMBOL(mtk_conn_md_bridge_reg); + +int mtk_conn_md_bridge_unreg(uint32 u_id) +{ + + int i_ret = -1; + + /*delete user */ + i_ret = conn_md_del_user(u_id); + return 0; +} +EXPORT_SYMBOL(mtk_conn_md_bridge_unreg); +int mtk_conn_md_bridge_send_msg(ipc_ilm_t *ilm) +{ + int i_ret = -1; + /*sanity check */ + if (NULL != ilm && NULL != ilm->local_para_ptr) { + /*send data */ + i_ret = conn_md_send_msg(ilm); + } else { + CONN_MD_ERR_FUNC("invalid parameter, ilm(0x08x), ilm local_para_ptr(0x%08x)\n", ilm, + NULL == ilm ? NULL : ilm->local_para_ptr); + i_ret = CONN_MD_ERR_INVALID_PARAM; + } + + return 0; +} +EXPORT_SYMBOL(mtk_conn_md_bridge_send_msg); diff --git a/drivers/misc/mediatek/conn_md/conn_md_log.c b/drivers/misc/mediatek/conn_md/conn_md_log.c new file mode 100644 index 000000000000..d7b91f92cc98 --- /dev/null +++ b/drivers/misc/mediatek/conn_md/conn_md_log.c @@ -0,0 +1,52 @@ +#include "conn_md_log.h" + +int g_conn_md_dbg_lvl = CONN_MD_LOG_INFO; + +/*Log defination*/ +int __conn_md_log_print(const char *str, ...) +{ + va_list args; + char temp_sring[DBG_LOG_STR_SIZE]; + + va_start(args, str); + vsnprintf(temp_sring, DBG_LOG_STR_SIZE, str, args); + va_end(args); + + pr_err("%s", temp_sring); + +/* print(KERN_INFO "%s",temp_sring); */ + + return 0; +} + +int __conn_md_get_log_lvl(void) +{ + /* return CONN_MD_LOG_INFO; */ + return g_conn_md_dbg_lvl; + +} + +#define CONN_MD_LOG_LOUD 4 +#define CONN_MD_LOG_DBG 3 +#define CONN_MD_LOG_INFO 2 +#define CONN_MD_LOG_WARN 1 +#define CONN_MD_LOG_ERR 0 + +int conn_md_log_set_lvl(int log_lvl) +{ + /* return CONN_MD_LOG_INFO; */ + g_conn_md_dbg_lvl = log_lvl; + + if (g_conn_md_dbg_lvl > CONN_MD_LOG_LOUD) { + CONN_MD_ERR_FUNC("log_lvl(%d) is too big, round to %d\n", log_lvl, CONN_MD_LOG_LOUD); + g_conn_md_dbg_lvl = CONN_MD_LOG_LOUD; + } + + if (g_conn_md_dbg_lvl < CONN_MD_LOG_ERR) { + CONN_MD_ERR_FUNC("log_lvl(%d) is too small, round to %d\n", log_lvl, CONN_MD_LOG_ERR); + g_conn_md_dbg_lvl = CONN_MD_LOG_ERR; + } + + return g_conn_md_dbg_lvl; + +} diff --git a/drivers/misc/mediatek/conn_md/conn_md_test.c b/drivers/misc/mediatek/conn_md/conn_md_test.c new file mode 100644 index 000000000000..a33575583e58 --- /dev/null +++ b/drivers/misc/mediatek/conn_md/conn_md_test.c @@ -0,0 +1,141 @@ + +#define DFT_TAG "[CONN_MD_EXP]" +#include "conn_md_log.h" + +#include "conn_md_exp.h" + +#include "conn_md.h" + +CONN_MD_BRIDGE_OPS g_ops; + +static int conn_md_test_rx_cb(ipc_ilm_t *ilm); + +int conn_md_test(void) +{ +#define PACKAGE_SIZE 100 + + ipc_ilm_t ilm; + local_para_struct *p_buf_str; + int i = 0; + int msg_len = 0; + + p_buf_str = kmalloc(sizeof(local_para_struct) + PACKAGE_SIZE, GFP_ATOMIC); + if (NULL == p_buf_str) { + CONN_MD_ERR_FUNC("kmalloc for local para ptr structure failed.\n"); + return -1; + } + p_buf_str->msg_len = PACKAGE_SIZE; + for (i = 0; i < PACKAGE_SIZE; i++) + p_buf_str->data[i] = i; + + ilm.local_para_ptr = p_buf_str; + + g_ops.rx_cb = conn_md_test_rx_cb; + + mtk_conn_md_bridge_reg(0x800001, &g_ops); + mtk_conn_md_bridge_reg(0x800005, &g_ops); + mtk_conn_md_bridge_reg(0x800009, &g_ops); + + ilm.dest_mod_id = 0x800005; + ilm.src_mod_id = 0x800001; + ilm.msg_id = 0; + + mtk_conn_md_bridge_send_msg(&ilm); + + ilm.dest_mod_id = 0x800005; + ilm.src_mod_id = 0x800009; + ilm.msg_id++; + msg_len += 10; + msg_len = ((msg_len >= PACKAGE_SIZE) ? PACKAGE_SIZE : msg_len); + ilm.local_para_ptr->msg_len = msg_len; + mtk_conn_md_bridge_send_msg(&ilm); + + ilm.dest_mod_id = 0x800001; + ilm.src_mod_id = 0x800009; + ilm.msg_id++; + msg_len += 10; + msg_len = ((msg_len >= PACKAGE_SIZE) ? PACKAGE_SIZE : msg_len); + ilm.local_para_ptr->msg_len = msg_len; + mtk_conn_md_bridge_send_msg(&ilm); + + ilm.dest_mod_id = 0x80000a; + ilm.src_mod_id = 0x800009; + ilm.msg_id++; + msg_len += 10; + msg_len = ((msg_len >= PACKAGE_SIZE) ? PACKAGE_SIZE : msg_len); + ilm.local_para_ptr->msg_len = msg_len; + mtk_conn_md_bridge_send_msg(&ilm); + + ilm.dest_mod_id = 0x800009; + ilm.src_mod_id = 0x80000a; + ilm.msg_id++; + msg_len += 10; + msg_len = ((msg_len >= PACKAGE_SIZE) ? PACKAGE_SIZE : msg_len); + ilm.local_para_ptr->msg_len = msg_len; + mtk_conn_md_bridge_send_msg(&ilm); + + ilm.dest_mod_id = 0x800005; + ilm.src_mod_id = 0x800001; + ilm.msg_id++; + msg_len += 10; + msg_len = ((msg_len >= PACKAGE_SIZE) ? PACKAGE_SIZE : msg_len); + ilm.local_para_ptr->msg_len = msg_len; + mtk_conn_md_bridge_send_msg(&ilm); + + ilm.dest_mod_id = 0x800001; + ilm.src_mod_id = 0x800005; + ilm.msg_id++; + msg_len += 10; + msg_len = ((msg_len >= PACKAGE_SIZE) ? PACKAGE_SIZE : msg_len); + ilm.local_para_ptr->msg_len = msg_len; + mtk_conn_md_bridge_send_msg(&ilm); + + ilm.dest_mod_id = 0x800001; + ilm.src_mod_id = 0x80000a; + ilm.msg_id++; + msg_len += 10; + msg_len = ((msg_len >= PACKAGE_SIZE) ? PACKAGE_SIZE : msg_len); + ilm.local_para_ptr->msg_len = msg_len; + mtk_conn_md_bridge_send_msg(&ilm); + + kfree(p_buf_str); + p_buf_str = NULL; + + conn_md_dmp_msg_queued(0, 0x80000a); + + mtk_conn_md_bridge_unreg(0x800001); + conn_md_dmp_msg_queued(0, 0); + conn_md_dmp_msg_active(0, 0); + + mtk_conn_md_bridge_unreg(0x800009); + + mtk_conn_md_bridge_unreg(0x80000a); + conn_md_dmp_msg_queued(0, 0); + conn_md_dmp_msg_active(0, 0); + + conn_md_dmp_msg_logged(0x800009, 0x800001); + conn_md_dmp_msg_logged(0x800009, 0); + conn_md_dmp_msg_logged(0, 0); + conn_md_dmp_msg_logged(0x80000a, 0); + + return 0; +} + +static int conn_md_test_rx_cb(ipc_ilm_t *ilm) +{ + int i = 0; + + pr_warn("%s, ilm:0x%p\n", __func__, ilm); + pr_warn("%s, ilm:src_id(%d), dst_id(%d), msg_id(%d)\n", __func__, + ilm->src_mod_id, ilm->dest_mod_id, ilm->msg_id); + + pr_warn("%s, local_para_ptr:0x%p, msg_len:%d\n", __func__, ilm->local_para_ptr, + ilm->local_para_ptr->msg_len); + + for (i = 0; i < ilm->local_para_ptr->msg_len; i++) { + pr_warn("%d ", ilm->local_para_ptr->data[i]); + if ((0 != i) && (((1 + i) % 8) == 0)) + pr_warn("\n"); + } + return 0; +} diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h index 9c592b3e0b03..a987619eff56 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h @@ -1598,7 +1598,12 @@ #define CFG_SUPPORT_THERMO_THROTTLING 1 #define WLAN_INCLUDE_PROC 1 -#define CFG_SUPPORT_DETECT_SECURITY_MODE_CHANGE 0 +#define CFG_SUPPORT_DETECT_SECURITY_MODE_CHANGE 1 +/*------------------------------------------------------------------------------ + * Flags of drop multicast packet when device suspend + *------------------------------------------------------------------------------ + */ +#define CFG_SUPPORT_DROP_MC_PACKET 0 /******************************************************************************* * D A T A T Y P E S ******************************************************************************** diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic_cmd_event.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic_cmd_event.h index bcfd26f4ff5b..1f6b5e6c3776 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic_cmd_event.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic_cmd_event.h @@ -749,10 +749,12 @@ typedef enum _ENUM_CMD_ID_T { CMD_ID_SET_PSCN_MAC_ADDR = 0x47, /* 0x47 (Set) */ CMD_ID_GET_GSCN_SCN_RESULT = 0x48, /* 0x48 (Get) */ CMD_ID_SET_COUNTRY_POWER_LIMIT = 0x4A, /* 0x4A (Set) */ + CMD_ID_REQ_CHNL_UTILIZATION = 0x5C, /* 0x5C (Get) */ CMD_ID_SET_SYSTEM_SUSPEND = 0x60, /* 0x60 (Set) */ #if CFG_SUPPORT_FCC_DYNAMIC_TX_PWR_ADJUST CMD_ID_SET_FCC_TX_PWR_CERT = 0x6F, /* 0x6F (Set) */ #endif + CMD_ID_SET_ALWAYS_SCAN_PARAM = 0x73,/*0x73(set)*/ CMD_ID_TDLS_PS = 0x75, /* 0x75 (Set) */ CMD_ID_GET_NIC_CAPABILITY = 0x80, /* 0x80 (Query) */ CMD_ID_GET_LINK_QUALITY, /* 0x81 (Query) */ @@ -859,6 +861,7 @@ typedef enum _ENUM_EVENT_ID_T { EVENT_ID_GSCAN_RESULT = 0x36, EVENT_ID_BATCH_RESULT = 0x37, EVENT_ID_CHECK_REORDER_BUBBLE = 0x39, + EVENT_ID_RSP_CHNL_UTILIZATION = 0x59, /* 0x59 (Query - CMD_ID_REQ_CHNL_UTILIZATION) */ EVENT_ID_TDLS = 0x80, EVENT_ID_STATS_ENV = 0x81, @@ -1462,7 +1465,9 @@ typedef struct _CMD_UPDATE_STA_RECORD_T { UINT_8 ucNeedResp; UINT_8 ucUapsdAc; /* b0~3: Trigger enabled, b4~7: Delivery enabled */ UINT_8 ucUapsdSp; /* 0: all, 1: max 2, 2: max 4, 3: max 6 */ - UINT_8 aucReserved[3]; + UINT_8 ucKeepAliveDuration; /* unit is 1s */ + UINT_8 ucKeepAliveOption; /* only bit0 is used now */ + UINT_8 aucReserved; /* TBD */ } CMD_UPDATE_STA_RECORD_T, *P_CMD_UPDATE_STA_RECORD_T; @@ -2207,6 +2212,24 @@ struct CMD_TDLS_PS_T { UINT_8 ucIsEnablePs; /* 0: disable tdls power save; 1: enable tdls power save */ UINT_8 aucReserved[3]; }; + +struct CMD_REQ_CHNL_UTILIZATION { + UINT_16 u2MeasureDuration; + UINT_8 ucChannelNum; + UINT_8 aucChannelList[48]; + UINT_8 aucReserved[13]; +}; + +struct EVENT_RSP_CHNL_UTILIZATION { + UINT_8 ucChannelNum; + UINT_8 aucChannelMeasureList[48]; + UINT_8 aucReserved0[15]; + UINT_8 aucChannelUtilization[48]; + UINT_8 aucReserved1[16]; + UINT_8 aucChannelBusyTime[48]; + UINT_8 aucReserved2[16]; +}; + /******************************************************************************* * P U B L I C D A T A ******************************************************************************** diff --git a/drivers/misc/mediatek/eccci/ccci_core.h b/drivers/misc/mediatek/eccci/ccci_core.h index 8289e41c587a..a26828ebceda 100644 --- a/drivers/misc/mediatek/eccci/ccci_core.h +++ b/drivers/misc/mediatek/eccci/ccci_core.h @@ -576,7 +576,7 @@ struct ccci_port { struct ccci_modem_cfg { unsigned int load_type; unsigned int load_type_saving; - volatile unsigned int setting; + unsigned int setting; }; #define MD_SETTING_ENABLE (1<<0) #define MD_SETTING_RELOAD (1<<1) @@ -691,7 +691,6 @@ typedef enum { CCCI_MESSAGE, CCIF_INTERRUPT, CCIF_INTR_SEQ, - CCIF_MPU_INTR, } MD_COMM_TYPE; typedef enum { diff --git a/drivers/misc/mediatek/ext_disp/extd_factory.c b/drivers/misc/mediatek/ext_disp/extd_factory.c index 92c137980092..f330e2b02030 100644 --- a/drivers/misc/mediatek/ext_disp/extd_factory.c +++ b/drivers/misc/mediatek/ext_disp/extd_factory.c @@ -17,7 +17,7 @@ #include "extd_log.h" #include "extd_factory.h" #include "extd_info.h" -#include "external_display.h" +#include "mt6755/external_display.h" #include "dpi_dvt_test.h" diff --git a/drivers/misc/mediatek/ext_disp/extd_multi_control.c b/drivers/misc/mediatek/ext_disp/extd_multi_control.c index 97c3a69eb2e1..99b7444fef32 100644 --- a/drivers/misc/mediatek/ext_disp/extd_multi_control.c +++ b/drivers/misc/mediatek/ext_disp/extd_multi_control.c @@ -16,7 +16,7 @@ #include "extd_multi_control.h" #include "disp_drv_platform.h" -#include "external_display.h" +#include "mt6755/external_display.h" #include "extd_platform.h" #include "extd_log.h" #include "mtk_ovl.h"