qcacld-3.0: Add CONFIG_MULTI_IF_LOG to support multi if log

This is a propagation of qcacld-2.0 commit 98821c7dcf49d ("qcacld-2.0:
Add CONFIG_MULTI_IF_LOG to support multi if log"). Add CONFIG_MULTI_IF_LOG
to support multi if log by assigning the specific netlink protocol
when dual wlan cards are loaded.

Change-Id: I3ea9574899c23a8d2ebbdea5b958cc3ad7947fe5
CRs-Fixed: 2525483
This commit is contained in:
Hangtian Zhu
2019-09-11 17:47:43 +08:00
committed by nshrivas
父節點 c9f78a60f8
當前提交 c7642605cc
共有 6 個文件被更改,包括 77 次插入3 次删除

3
Kbuild
查看文件

@@ -2257,6 +2257,9 @@ cppflags-$(CONFIG_FEATURE_BECN_STATS) += -DWLAN_FEATURE_BEACON_RECEPTION_STATS
#Set RX_PERFORMANCE #Set RX_PERFORMANCE
cppflags-$(CONFIG_RX_PERFORMANCE) += -DRX_PERFORMANCE cppflags-$(CONFIG_RX_PERFORMANCE) += -DRX_PERFORMANCE
#Set MULTI_IF_LOG
cppflags-$(CONFIG_MULTI_IF_LOG) += -DMULTI_IF_LOG
#Set SLUB_MEM_OPTIMIZE #Set SLUB_MEM_OPTIMIZE
cppflags-$(CONFIG_SLUB_MEM_OPTIMIZE) += -DSLUB_MEM_OPTIMIZE cppflags-$(CONFIG_SLUB_MEM_OPTIMIZE) += -DSLUB_MEM_OPTIMIZE

查看文件

@@ -105,6 +105,7 @@ ifeq ($(CONFIG_ARCH_QCS40X), y)
CONFIG_WLAN_SYNC_TSF_PLUS_NOIRQ := y CONFIG_WLAN_SYNC_TSF_PLUS_NOIRQ := y
CONFIG_RX_PERFORMANCE := y CONFIG_RX_PERFORMANCE := y
CONFIG_TGT_NUM_MSDU_DESC := 900 CONFIG_TGT_NUM_MSDU_DESC := 900
CONFIG_MULTI_IF_LOG := y
endif endif
CONFIG_WLAN_FEATURE_MBSSID := y CONFIG_WLAN_FEATURE_MBSSID := y

查看文件

@@ -275,6 +275,66 @@ enum hdd_dot11_mode {
1, \ 1, \
"Wlan logging enable") "Wlan logging enable")
/*
* <ini>
* host_log_custom_nl_proto - Host log netlink protocol
* @Min: 0
* @Max: 32
* @Default: 2
*
* This ini is used to set host log netlink protocol. The default
* value is 2 (NETLINK_USERSOCK), customer should avoid selecting the
* netlink protocol that already used on their platform by other
* applications or services. By choosing the non-default value(2),
* Customer need to change the netlink protocol of application receive
* tool(cnss_diag) accordingly. Available values could be:
*
* host_log_custom_nl_proto = 0 - NETLINK_ROUTE, Routing/device hook
* host_log_custom_nl_proto = 1 - NETLINK_UNUSED, Unused number
* host_log_custom_nl_proto = 2 - NETLINK_USERSOCK, Reserved for user
* mode socket protocols
* host_log_custom_nl_proto = 3 - NETLINK_FIREWALL, Unused number,
* formerly ip_queue
* host_log_custom_nl_proto = 4 - NETLINK_SOCK_DIAG, socket monitoring
* host_log_custom_nl_proto = 5 - NETLINK_NFLOG, netfilter/iptables ULOG
* host_log_custom_nl_proto = 6 - NETLINK_XFRM, ipsec
* host_log_custom_nl_proto = 7 - NETLINK_SELINUX, SELinux event
* notifications
* host_log_custom_nl_proto = 8 - NETLINK_ISCSI, Open-iSCSI
* host_log_custom_nl_proto = 9 - NETLINK_AUDIT, auditing
* host_log_custom_nl_proto = 10 - NETLINK_FIB_LOOKUP
* host_log_custom_nl_proto = 11 - NETLINK_CONNECTOR
* host_log_custom_nl_proto = 12 - NETLINK_NETFILTER, netfilter subsystem
* host_log_custom_nl_proto = 13 - NETLINK_IP6_FW
* host_log_custom_nl_proto = 14 - NETLINK_DNRTMSG, DECnet routing messages
* host_log_custom_nl_proto = 15 - NETLINK_KOBJECT_UEVENT, Kernel
* messages to userspace
* host_log_custom_nl_proto = 16 - NETLINK_GENERIC, leave room for
* NETLINK_DM (DM Events)
* host_log_custom_nl_proto = 18 - NETLINK_SCSITRANSPORT, SCSI Transports
* host_log_custom_nl_proto = 19 - NETLINK_ECRYPTFS
* host_log_custom_nl_proto = 20 - NETLINK_RDMA
* host_log_custom_nl_proto = 21 - NETLINK_CRYPTO, Crypto layer
* host_log_custom_nl_proto = 22 - NETLINK_SMC, SMC monitoring
*
* The max value is: MAX_LINKS which is 32
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_HOST_LOG_CUSTOM_NETLINK_PROTO CFG_INI_UINT( \
"host_log_custom_nl_proto", \
0, \
32, \
2, \
CFG_VALUE_OR_DEFAULT, \
"host log custom netlink protocol")
/* /*
* <ini> * <ini>
* wlanLoggingToConsole - Wlan logging to console * wlanLoggingToConsole - Wlan logging to console
@@ -291,7 +351,8 @@ enum hdd_dot11_mode {
#define CFG_WLAN_LOGGING_SUPPORT_ALL \ #define CFG_WLAN_LOGGING_SUPPORT_ALL \
CFG(CFG_WLAN_LOGGING_SUPPORT) \ CFG(CFG_WLAN_LOGGING_SUPPORT) \
CFG(CFG_WLAN_LOGGING_CONSOLE_SUPPORT) CFG(CFG_WLAN_LOGGING_CONSOLE_SUPPORT) \
CFG(CFG_HOST_LOG_CUSTOM_NETLINK_PROTO)
#else #else
#define CFG_WLAN_LOGGING_SUPPORT_ALL #define CFG_WLAN_LOGGING_SUPPORT_ALL
#endif #endif

查看文件

@@ -138,6 +138,7 @@ struct hdd_config {
/* WLAN Logging */ /* WLAN Logging */
bool wlan_logging_enable; bool wlan_logging_enable;
bool wlan_logging_to_console; bool wlan_logging_to_console;
uint8_t host_log_custom_nl_proto;
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */ #endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN #ifdef FEATURE_WLAN_AUTO_SHUTDOWN

查看文件

@@ -2943,7 +2943,10 @@ static inline void hdd_set_tso_flags(struct hdd_context *hdd_ctx,
*/ */
static inline int wlan_hdd_nl_init(struct hdd_context *hdd_ctx) static inline int wlan_hdd_nl_init(struct hdd_context *hdd_ctx)
{ {
hdd_ctx->radio_index = nl_srv_init(hdd_ctx->wiphy); int proto;
proto = hdd_ctx->config->host_log_custom_nl_proto;
hdd_ctx->radio_index = nl_srv_init(hdd_ctx->wiphy, proto);
/* radio_index is assigned from 0, so only >=0 will be valid index */ /* radio_index is assigned from 0, so only >=0 will be valid index */
if (hdd_ctx->radio_index >= 0) if (hdd_ctx->radio_index >= 0)
@@ -2963,7 +2966,10 @@ static inline int wlan_hdd_nl_init(struct hdd_context *hdd_ctx)
*/ */
static inline int wlan_hdd_nl_init(struct hdd_context *hdd_ctx) static inline int wlan_hdd_nl_init(struct hdd_context *hdd_ctx)
{ {
return nl_srv_init(hdd_ctx->wiphy); int proto;
proto = hdd_ctx->config->host_log_custom_nl_proto;
return nl_srv_init(hdd_ctx->wiphy, proto);
} }
#endif #endif
QDF_STATUS hdd_sme_open_session_callback(uint8_t vdev_id, QDF_STATUS hdd_sme_open_session_callback(uint8_t vdev_id,

查看文件

@@ -9862,6 +9862,8 @@ static void hdd_init_wlan_logging_params(struct hdd_config *config,
config->wlan_logging_to_console = config->wlan_logging_to_console =
cfg_get(psoc, CFG_WLAN_LOGGING_CONSOLE_SUPPORT); cfg_get(psoc, CFG_WLAN_LOGGING_CONSOLE_SUPPORT);
config->host_log_custom_nl_proto =
cfg_get(psoc, CFG_HOST_LOG_CUSTOM_NETLINK_PROTO);
} }
#else #else
static void hdd_init_wlan_logging_params(struct hdd_config *config, static void hdd_init_wlan_logging_params(struct hdd_config *config,