2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 21:54:06 +08:00
linux-next/net/qrtr/qrtr.h
Bjorn Andersson 71046abfff 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.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-03 17:52:21 -08:00

37 lines
917 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __QRTR_H_
#define __QRTR_H_
#include <linux/types.h>
struct sk_buff;
/* endpoint node id auto assignment */
#define QRTR_EP_NID_AUTO (-1)
/**
* struct qrtr_endpoint - endpoint handle
* @xmit: Callback for outgoing packets
*
* The socket buffer passed to the xmit function becomes owned by the endpoint
* driver. As such, when the driver is done with the buffer, it should
* call kfree_skb() on failure, or consume_skb() on success.
*/
struct qrtr_endpoint {
int (*xmit)(struct qrtr_endpoint *ep, struct sk_buff *skb);
/* private: not for endpoint use */
struct qrtr_node *node;
};
int qrtr_endpoint_register(struct qrtr_endpoint *ep, unsigned int nid);
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(void);
void qrtr_ns_remove(void);
#endif