diff options
| author | hqu <hqu@codeaurora.org> | 2017-04-05 17:23:41 +0800 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-04-11 04:36:51 -0700 |
| commit | c2b912e210848ce35160a036dc64e4342d06098a (patch) | |
| tree | 254ed49495d0edb072a75770867bd00b2adb189a | |
| parent | 9b95445e68b59b1f632501ba9e7ef237efae2639 (diff) | |
qcacld-3.0: Fix cnss diag log capture issue
Presently if the module name is changed to something other than wlan,
then MULTI_IF_NAME is defined and cnss diag log can't be captured
because the driver doesn't register itself to cnss_logger module.
Add fix to resolve this issue.
Also add free skb buffer operation for one case to sync with qcacld-2.0.
Change-Id: I815c5260fbc248e37e1ec0417ed5a8cc476ca8b7
CRs-Fixed: 2029803
| -rw-r--r-- | core/utils/nlink/src/wlan_nlink_srv.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/core/utils/nlink/src/wlan_nlink_srv.c b/core/utils/nlink/src/wlan_nlink_srv.c index bafeb4b9b78b..87390264ca39 100644 --- a/core/utils/nlink/src/wlan_nlink_srv.c +++ b/core/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 <linux/version.h> #include <linux/kernel.h> @@ -51,13 +43,6 @@ #include <wlan_nlink_srv.h> #include <qdf_trace.h> -#ifdef CNSS_GENL -#include <qdf_mem.h> -#include <wlan_nlink_common.h> -#include <net/genetlink.h> -#include <net/cnss_nl.h> -#endif - #if defined(CONFIG_CNSS_LOGGER) #include <net/cnss_logger.h> @@ -269,8 +254,21 @@ inline int nl_srv_is_initialized(void) return -EPERM; } -#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 <qdf_mem.h> +#include <wlan_nlink_common.h> +#include <net/genetlink.h> +#include <net/cnss_nl.h> +#endif /* Global variables */ static DEFINE_MUTEX(nl_srv_sem); @@ -709,10 +707,8 @@ int nl_srv_is_initialized(void) return -EPERM; } -#endif -#else /* ifndef MULTI_IF_NAME */ -#include <wlan_nlink_srv.h> +#else int nl_srv_init(void *wiphy) { @@ -735,16 +731,18 @@ 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; } int nl_srv_is_initialized(void) { - return 0; + return -EPERM; } #endif |
