0c2204a4ad
The QRTR nameservice has been maintained in userspace for some time. This commit migrates it to Linux kernel. This change is required in order to eliminate the need of starting a userspace daemon for making the WiFi functional for ath11k based devices. Since the QRTR NS is not usually packed in most of the distros, users need to clone, build and install it to get the WiFi working. It will become a hassle when the user doesn't have any other source of network connectivity. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
37 lines
937 B
C
37 lines
937 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(struct work_struct *work);
|
|
|
|
void qrtr_ns_remove(void);
|
|
|
|
#endif
|