From 674474c55a1bfdda0af2ae6e10fadcd0541b4466 Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Wed, 30 Jun 2021 18:38:05 -0700 Subject: [PATCH] qcacmn: Add CONFIG_CNSS_OUT_OF_TREE flag Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are built from in-kernel-tree source or out-of-kernel-tree source since the exposed header files will be in different paths. This is also for backward compatibility. Change-Id: I698492f175ea140e6854c372f366a63f36de24c9 CRs-fixed: 3022556 --- os_if/linux/spectral/src/os_if_spectral_netlink.c | 4 ++++ os_if/linux/wifi_pos/src/os_if_wifi_pos.c | 4 ++++ utils/fwlog/dbglog_host.c | 4 ++++ utils/logging/src/wlan_logging_sock_svc.c | 4 ++++ utils/nlink/src/wlan_nlink_srv.c | 6 +++++- utils/ptt/src/wlan_ptt_sock_svc.c | 6 +++++- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/os_if/linux/spectral/src/os_if_spectral_netlink.c b/os_if/linux/spectral/src/os_if_spectral_netlink.c index 9ee2e0b2e3..c2471bf22c 100644 --- a/os_if/linux/spectral/src/os_if_spectral_netlink.c +++ b/os_if/linux/spectral/src/os_if_spectral_netlink.c @@ -24,8 +24,12 @@ #include #include #ifdef CNSS_GENL +#ifdef CONFIG_CNSS_OUT_OF_TREE +#include "cnss_nl.h" +#else #include #endif +#endif #include /** diff --git a/os_if/linux/wifi_pos/src/os_if_wifi_pos.c b/os_if/linux/wifi_pos/src/os_if_wifi_pos.c index 9a45a9c0ce..e276c4f584 100644 --- a/os_if/linux/wifi_pos/src/os_if_wifi_pos.c +++ b/os_if/linux/wifi_pos/src/os_if_wifi_pos.c @@ -32,7 +32,11 @@ #include "wlan_cfg80211.h" #include "wlan_objmgr_psoc_obj.h" #ifdef CNSS_GENL +#ifdef CONFIG_CNSS_OUT_OF_TREE +#include "cnss_nl.h" +#else #include +#endif #include "linux/genetlink.h" #include "wifi_pos_utils_pub.h" #endif diff --git a/utils/fwlog/dbglog_host.c b/utils/fwlog/dbglog_host.c index 3382eac76d..ddeaadc3e6 100644 --- a/utils/fwlog/dbglog_host.c +++ b/utils/fwlog/dbglog_host.c @@ -38,7 +38,11 @@ #include "wmi_unified_priv.h" #ifdef CNSS_GENL +#ifdef CONFIG_CNSS_OUT_OF_TREE +#include "cnss_nl.h" +#else #include +#endif #include "wlan_cfg80211.h" #endif diff --git a/utils/logging/src/wlan_logging_sock_svc.c b/utils/logging/src/wlan_logging_sock_svc.c index 28532ce2ba..a9beaa2c17 100644 --- a/utils/logging/src/wlan_logging_sock_svc.c +++ b/utils/logging/src/wlan_logging_sock_svc.c @@ -38,8 +38,12 @@ #include #ifdef CNSS_GENL +#ifdef CONFIG_CNSS_OUT_OF_TREE +#include "cnss_nl.h" +#else #include #endif +#endif #if defined(FEATURE_FW_LOG_PARSING) || defined(FEATURE_WLAN_DIAG_SUPPORT) || \ defined(FEATURE_PKTLOG) diff --git a/utils/nlink/src/wlan_nlink_srv.c b/utils/nlink/src/wlan_nlink_srv.c index d0b79feb06..90646692f4 100644 --- a/utils/nlink/src/wlan_nlink_srv.c +++ b/utils/nlink/src/wlan_nlink_srv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 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 @@ -265,7 +265,11 @@ qdf_export_symbol(nl_srv_is_initialized); #include #include #include +#ifdef CONFIG_CNSS_OUT_OF_TREE +#include "cnss_nl.h" +#else #include +#endif void cld80211_oem_send_reply(struct sk_buff *msg, void *hdr, struct nlattr *nest, int flags) diff --git a/utils/ptt/src/wlan_ptt_sock_svc.c b/utils/ptt/src/wlan_ptt_sock_svc.c index be03c926a4..de6e96a4aa 100644 --- a/utils/ptt/src/wlan_ptt_sock_svc.c +++ b/utils/ptt/src/wlan_ptt_sock_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 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 @@ -31,7 +31,11 @@ #include #ifdef CNSS_GENL +#ifdef CONFIG_CNSS_OUT_OF_TREE +#include "cnss_nl.h" +#else #include +#endif #include #endif