android_kernel_xiaomi_sm8350/include/net/cnss_logger.h
Paul Zhang bb06fdbcd0 net: cnss: add snapshot of cnss platform driver
This is a snapshot of the CNSS driver and associated files as of
msm-4.14 commit b56fde2f9abd44
("cnss: Add cnss driver to msm-4.14").

Add Kconfig dependency.
Comment obsolete codes to fix some compiler issues.

Change-Id: I89bf0a85b086c7482609b331273d9eaf2fb66648
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
2021-01-26 18:00:23 -08:00

57 lines
1.4 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2016,2021, The Linux Foundation. All rights reserved. */
#ifndef _NET_CNSS_LOGGER_H_
#define _NET_CNSS_LOGGER_H_
struct sk_buff;
struct wiphy;
#if IS_ENABLED(CONFIG_CNSS_LOGGER)
int cnss_logger_event_register(int radio, int event,
int (*cb)(struct sk_buff *skb));
int cnss_logger_event_unregister(int radio, int event,
int (*cb)(struct sk_buff *skb));
int cnss_logger_device_register(struct wiphy *wiphy, const char *name);
int cnss_logger_device_unregister(int radio, struct wiphy *wiphy);
int cnss_logger_nl_ucast(struct sk_buff *skb, int portid, int flag);
int cnss_logger_nl_bcast(struct sk_buff *skb, int portid, int flag);
#else
static inline int cnss_logger_event_register(int radio, int event,
int (*cb)(struct sk_buff *skb))
{
return 0;
}
static inline int cnss_logger_event_unregister(int radio, int event,
int (*cb)(struct sk_buff *skb))
{
return 0;
}
static inline int cnss_logger_device_register(struct wiphy *wiphy,
const char *name)
{
return 0;
}
static inline int cnss_logger_device_unregister(int radio, struct wiphy *wiphy)
{
return 0;
}
static inline int cnss_logger_nl_ucast(struct sk_buff *skb, int portid,
int flag)
{
return 0;
}
static inline int cnss_logger_nl_bcast(struct sk_buff *skb, int portid,
int flag)
{
return 0;
}
#endif /* CONFIG_CNSS_LOGGER */
#endif /* _NET_CNSS_LOGGER_H_ */