rmnet_ctl: remove dependencies
Removes hard dependendencies between rmnet_core and rmnet_ctl. Change-Id: I9931380fc6406eec5842a824181a0bacbb6ce73a Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
此提交包含在:
@@ -10,8 +10,6 @@
|
||||
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
#define CONFIG_RMNET_CTL 1
|
||||
|
||||
enum rmnet_ctl_log_lvl {
|
||||
RMNET_CTL_LOG_CRIT,
|
||||
RMNET_CTL_LOG_ERR,
|
||||
@@ -19,50 +17,16 @@ enum rmnet_ctl_log_lvl {
|
||||
RMNET_CTL_LOG_DEBUG,
|
||||
};
|
||||
|
||||
#define rmnet_ctl_log_err(msg, rc, data, len) \
|
||||
rmnet_ctl_log(RMNET_CTL_LOG_ERR, msg, rc, data, len)
|
||||
|
||||
#define rmnet_ctl_log_info(msg, data, len) \
|
||||
rmnet_ctl_log(RMNET_CTL_LOG_INFO, msg, 0, data, len)
|
||||
|
||||
#define rmnet_ctl_log_debug(msg, data, len) \
|
||||
rmnet_ctl_log(RMNET_CTL_LOG_DEBUG, msg, 0, data, len)
|
||||
|
||||
struct rmnet_ctl_client_hooks {
|
||||
void (*ctl_dl_client_hook)(struct sk_buff *skb);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RMNET_CTL
|
||||
|
||||
void *rmnet_ctl_register_client(struct rmnet_ctl_client_hooks *hook);
|
||||
int rmnet_ctl_unregister_client(void *handle);
|
||||
int rmnet_ctl_send_client(void *handle, struct sk_buff *skb);
|
||||
void rmnet_ctl_log(enum rmnet_ctl_log_lvl lvl, const char *msg,
|
||||
int rc, const void *data, unsigned int len);
|
||||
|
||||
#else
|
||||
|
||||
static inline void *rmnet_ctl_register_client(
|
||||
struct rmnet_ctl_client_hooks *hook)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int rmnet_ctl_unregister_client(void *handle)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int rmnet_ctl_send_client(void *handle, struct sk_buff *skb)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void rmnet_ctl_log(enum rmnet_ctl_log_lvl lvl, const char *msg,
|
||||
int rc, const void *data, unsigned int len)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_RMNET_CTL */
|
||||
struct rmnet_ctl_client_if {
|
||||
void * (*reg)(struct rmnet_ctl_client_hooks *hook);
|
||||
int (*dereg)(void *handle);
|
||||
int (*send)(void *handle, struct sk_buff *skb);
|
||||
void (*log)(enum rmnet_ctl_log_lvl lvl, const char *msg, int rc,
|
||||
const void *data, unsigned int len);
|
||||
};
|
||||
|
||||
#endif /* _RMNET_CTL_H_ */
|
||||
|
新增問題並參考
封鎖使用者