diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index 3471f8a0c6..7036376c11 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -3453,7 +3453,7 @@ qdf_export_symbol(QDF_PRINT_INFO); void qdf_logging_init(void) { wlan_logging_sock_init_svc(); - nl_srv_init(NULL); + nl_srv_init(NULL, WLAN_NLINK_PROTO_FAMILY); wlan_logging_set_flush_timer(qdf_log_flush_timer_period); } @@ -3479,7 +3479,7 @@ void qdf_logging_flush_logs(void) #else void qdf_logging_init(void) { - nl_srv_init(NULL); + nl_srv_init(NULL, WLAN_NLINK_PROTO_FAMILY); } void qdf_logging_exit(void) diff --git a/utils/nlink/inc/wlan_nlink_srv.h b/utils/nlink/inc/wlan_nlink_srv.h index 53c2d6e283..627c2471b6 100644 --- a/utils/nlink/inc/wlan_nlink_srv.h +++ b/utils/nlink/inc/wlan_nlink_srv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -40,7 +40,7 @@ typedef int (*nl_srv_msg_callback)(struct sk_buff *skb); -int nl_srv_init(void *wiphy); +int nl_srv_init(void *wiphy, int proto); void nl_srv_exit(void); int nl_srv_register(tWlanNlModTypes msg_type, nl_srv_msg_callback msg_handler); int nl_srv_unregister(tWlanNlModTypes msg_type, diff --git a/utils/nlink/src/wlan_nlink_srv.c b/utils/nlink/src/wlan_nlink_srv.c index 95370a9964..6c5b9d5d0e 100644 --- a/utils/nlink/src/wlan_nlink_srv.c +++ b/utils/nlink/src/wlan_nlink_srv.c @@ -48,6 +48,7 @@ static bool logger_initialized; /** * nl_srv_init() - wrapper function to register to cnss_logger * @wiphy: the pointer to the wiphy structure + * @proto: the host log netlink protocol * * The netlink socket is no longer initialized in the driver itself, instead * will be initialized in the cnss_logger module, the driver should register @@ -60,7 +61,7 @@ static bool logger_initialized; * * Return: radio index for success and -EINVAL for failure */ -int nl_srv_init(void *wiphy) +int nl_srv_init(void *wiphy, int proto) { if (logger_initialized) goto initialized; @@ -267,7 +268,7 @@ qdf_export_symbol(nl_srv_is_initialized); #include /* For CNSS_GENL netlink sockets will be initialized by CNSS Kernel Module */ -int nl_srv_init(void *wiphy) +int nl_srv_init(void *wiphy, int proto) { return 0; } @@ -481,7 +482,7 @@ int nl_srv_ucast(struct sk_buff *skb, int dst_pid, int flag, return 0; } -#elif !defined(MULTI_IF_NAME) +#elif !defined(MULTI_IF_NAME) || defined(MULTI_IF_LOG) /* Global variables */ static DEFINE_MUTEX(nl_srv_sem); @@ -497,7 +498,7 @@ static void nl_srv_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh); * Initialize the netlink service. * Netlink service is usable after this. */ -int nl_srv_init(void *wiphy) +int nl_srv_init(void *wiphy, int proto) { int retcode = 0; struct netlink_kernel_cfg cfg = { @@ -505,7 +506,7 @@ int nl_srv_init(void *wiphy) .input = nl_srv_rcv }; - nl_srv_sock = netlink_kernel_create(&init_net, WLAN_NLINK_PROTO_FAMILY, + nl_srv_sock = netlink_kernel_create(&init_net, proto, &cfg); if (nl_srv_sock) { @@ -738,7 +739,7 @@ qdf_export_symbol(nl_srv_is_initialized); #else -int nl_srv_init(void *wiphy) +int nl_srv_init(void *wiphy, int proto) { return 0; }