android_kernel_motorola_sm6225/net/qrtr/qrtr.h
Arun Kumar Neelakantam 4a6eb4b3e2 net: qrtr: Make qrtr rx threads as RT priorities
To support high priority clients like sensor use cases in all system
conditions elevating the router reader threads to RT priorities based
on configuration.

Change-Id: I6f46097f6678f2e00c3ec8872b208d773c377224
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2019-08-20 19:16:06 -07:00

37 lines
991 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)
#define QRTR_EP_NET_ID_AUTO (1)
#define QRTR_DEL_PROC_MAGIC 0xe111
/**
* 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 net_id,
bool rt);
void qrtr_endpoint_unregister(struct qrtr_endpoint *ep);
int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len);
int qrtr_peek_pkt_size(const void *data);
#endif