diff --git a/utils/nlink/src/wlan_nlink_srv.c b/utils/nlink/src/wlan_nlink_srv.c index 1ebc8e86a13d..4be9b17dc46d 100644 --- a/utils/nlink/src/wlan_nlink_srv.c +++ b/utils/nlink/src/wlan_nlink_srv.c @@ -31,14 +31,6 @@ * This file contains the definitions specific to the wlan_nlink_srv * ******************************************************************************/ -/* - * If MULTI_IF_NAME is not defined, then this is the primary instance of the - * driver and the diagnostics netlink socket will be available. If - * MULTI_IF_NAME is defined then this is not the primary instance of the driver - * and the diagnotics netlink socket will not be available since this - * diagnostics netlink socket can only be exposed by one instance of the driver. - */ -#ifndef MULTI_IF_NAME #include #include @@ -52,13 +44,6 @@ #include #include -#ifdef CNSS_GENL -#include -#include -#include -#include -#endif - #if defined(CONFIG_CNSS_LOGGER) #include @@ -275,8 +260,21 @@ inline int nl_srv_is_initialized(void) } qdf_export_symbol(nl_srv_is_initialized); -#else +/* + * If MULTI_IF_NAME is not defined, then this is the primary instance of the + * driver and the diagnostics netlink socket will be available. If + * MULTI_IF_NAME is defined then this is not the primary instance of the driver + * and the diagnotics netlink socket will not be available since this + * diagnostics netlink socket can only be exposed by one instance of the driver. + */ +#elif !defined(MULTI_IF_NAME) +#ifdef CNSS_GENL +#include +#include +#include +#include +#endif /* Global variables */ static DEFINE_MUTEX(nl_srv_sem); @@ -719,10 +717,8 @@ int nl_srv_is_initialized(void) return -EPERM; } qdf_export_symbol(nl_srv_is_initialized); -#endif -#else /* ifndef MULTI_IF_NAME */ -#include +#else int nl_srv_init(void *wiphy) { @@ -745,18 +741,20 @@ int nl_srv_unregister(tWlanNlModTypes msg_type, nl_srv_msg_callback msg_handler) int nl_srv_ucast(struct sk_buff *skb, int dst_pid, int flag) { + dev_kfree_skb(skb); return 0; } int nl_srv_bcast(struct sk_buff *skb) { + dev_kfree_skb(skb); return 0; } qdf_export_symbol(nl_srv_bcast); int nl_srv_is_initialized(void) { - return 0; + return -EPERM; } qdf_export_symbol(nl_srv_is_initialized); #endif