Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efbe72e3 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Chris Lew
Browse files

net: qrtr: Fix FIXME related to qrtr_ns_init()



The 2 second delay before calling qrtr_ns_init() meant that the remote
processors would register as endpoints in qrtr and the say_hello() call
would therefor broadcast the outgoing HELLO to them. With the HELLO
handshake corrected this delay is no longer needed.

Change-Id: I20aa56cbb6c54cbbd0ccb77e30bcf59661d449cc
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tested-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: 71046abfffe9d34ae90c82cf9c8e44355c2e114c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent fbf873fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -693,7 +693,7 @@ static void qrtr_ns_data_ready(struct sock *sk)
	queue_work(qrtr_ns.workqueue, &qrtr_ns.work);
}

void qrtr_ns_init(struct work_struct *work)
void qrtr_ns_init(void)
{
	struct sockaddr_qrtr sq;
	int ret;
+1 −9
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
#include <linux/numa.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include <linux/rwsem.h>
#include <linux/uidgid.h>
#include <linux/pm_wakeup.h>
@@ -131,8 +130,6 @@ static DECLARE_RWSEM(qrtr_epts_lock);
static DEFINE_IDR(qrtr_ports);
static DEFINE_SPINLOCK(qrtr_port_lock);

static struct delayed_work qrtr_ns_work;

/**
 * struct qrtr_node - endpoint node
 * @ep_lock: lock for endpoint management and callbacks
@@ -1921,11 +1918,7 @@ static int __init qrtr_proto_init(void)
		return rc;
	}

	/* FIXME: Currently, this 2s delay is required to catch the NEW_SERVER
	 * messages from routers. But the fix could be somewhere else.
	 */
	INIT_DELAYED_WORK(&qrtr_ns_work, qrtr_ns_init);
	schedule_delayed_work(&qrtr_ns_work, msecs_to_jiffies(2000));
	qrtr_ns_init();

	return rc;
}
@@ -1933,7 +1926,6 @@ postcore_initcall(qrtr_proto_init);

static void __exit qrtr_proto_fini(void)
{
	cancel_delayed_work_sync(&qrtr_ns_work);
	qrtr_ns_remove();
	sock_unregister(qrtr_family.family);
	proto_unregister(&qrtr_proto);
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ void qrtr_endpoint_unregister(struct qrtr_endpoint *ep);

int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len);

void qrtr_ns_init(struct work_struct *work);
void qrtr_ns_init(void);

void qrtr_ns_remove(void);