Loading net/qrtr/qrtr.c +14 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <linux/rwsem.h> #include <linux/ipc_logging.h> #include <linux/uidgid.h> #include <linux/pm_wakeup.h> #include <net/sock.h> #include <uapi/linux/sched/types.h> Loading Loading @@ -150,6 +151,7 @@ static DEFINE_MUTEX(qrtr_port_lock); * @kworker: worker thread for recv work * @task: task to run the worker thread * @read_data: scheduled work for recv work * @ws: wakeupsource avoid system suspend * @ilc: ipc logging context reference */ struct qrtr_node { Loading @@ -171,6 +173,8 @@ struct qrtr_node { struct task_struct *task; struct kthread_work read_data; struct wakeup_source *ws; void *ilc; }; Loading Loading @@ -347,6 +351,7 @@ static void __qrtr_node_release(struct kref *kref) } mutex_unlock(&node->qrtr_tx_lock); wakeup_source_unregister(node->ws); kthread_flush_worker(&node->kworker); kthread_stop(node->task); Loading Loading @@ -611,10 +616,16 @@ static void qrtr_node_assign(struct qrtr_node *node, unsigned int nid) node->nid = nid; up_write(&qrtr_node_lock); if (!node->ilc) { snprintf(name, sizeof(name), "qrtr_%d", nid); if (!node->ilc) { node->ilc = ipc_log_context_create(QRTR_LOG_PAGE_CNT, name, 0); } /* create wakeup source for only NID = 3,0 or 7. * From other nodes sensor service stream samples * cause APPS suspend problems and power drain issue. */ if (!node->ws && (nid == 0 || nid == 3 || nid == 7)) node->ws = wakeup_source_register(name); } /** Loading Loading @@ -745,6 +756,8 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len) cb->type != QRTR_TYPE_RESUME_TX) goto err; pm_wakeup_ws_event(node->ws, 0, true); if (frag) { skb->data_len = size; skb->len = size; Loading Loading
net/qrtr/qrtr.c +14 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <linux/rwsem.h> #include <linux/ipc_logging.h> #include <linux/uidgid.h> #include <linux/pm_wakeup.h> #include <net/sock.h> #include <uapi/linux/sched/types.h> Loading Loading @@ -150,6 +151,7 @@ static DEFINE_MUTEX(qrtr_port_lock); * @kworker: worker thread for recv work * @task: task to run the worker thread * @read_data: scheduled work for recv work * @ws: wakeupsource avoid system suspend * @ilc: ipc logging context reference */ struct qrtr_node { Loading @@ -171,6 +173,8 @@ struct qrtr_node { struct task_struct *task; struct kthread_work read_data; struct wakeup_source *ws; void *ilc; }; Loading Loading @@ -347,6 +351,7 @@ static void __qrtr_node_release(struct kref *kref) } mutex_unlock(&node->qrtr_tx_lock); wakeup_source_unregister(node->ws); kthread_flush_worker(&node->kworker); kthread_stop(node->task); Loading Loading @@ -611,10 +616,16 @@ static void qrtr_node_assign(struct qrtr_node *node, unsigned int nid) node->nid = nid; up_write(&qrtr_node_lock); if (!node->ilc) { snprintf(name, sizeof(name), "qrtr_%d", nid); if (!node->ilc) { node->ilc = ipc_log_context_create(QRTR_LOG_PAGE_CNT, name, 0); } /* create wakeup source for only NID = 3,0 or 7. * From other nodes sensor service stream samples * cause APPS suspend problems and power drain issue. */ if (!node->ws && (nid == 0 || nid == 3 || nid == 7)) node->ws = wakeup_source_register(name); } /** Loading Loading @@ -745,6 +756,8 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len) cb->type != QRTR_TYPE_RESUME_TX) goto err; pm_wakeup_ws_event(node->ws, 0, true); if (frag) { skb->data_len = size; skb->len = size; Loading