From a95ed8ed3c8b4fa77fc6116996dbc8aa73aaf7f5 Mon Sep 17 00:00:00 2001 From: David Oladunjoye Date: Wed, 11 May 2022 11:45:11 -0700 Subject: [PATCH] qcacmn: Add back port flag for SA Query Offload support Need to indicate which Linux Kernel contains support for this feature. Add logic to set back port flag based on linux kernel version. Change-Id: Icea20b82c0d6c2d546711214c5b268bee864fc72 CRs-Fixed: 3194602 --- os_if/linux/wlan_osif_features.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/os_if/linux/wlan_osif_features.h b/os_if/linux/wlan_osif_features.h index 3dea46e654..eb23faf12e 100644 --- a/os_if/linux/wlan_osif_features.h +++ b/os_if/linux/wlan_osif_features.h @@ -61,4 +61,26 @@ #define CFG80211_11BE_BASIC 1 #endif +/* + * CFG80211_SA_QUERY_OFFLOAD_SUPPORT + * Used to indicate the Linux Kernel contains support to offload SA Query + * procedures for AP SME device + * + * This feature was introduced in Linux Kernel 5.17 via: + * 47301a74bbfa ("nl80211: Add support to set AP settings flags with single attribute") + * 87c1aec15dee ("nl80211: Add support to offload SA Query procedures for AP SME device") + * + * This feature was backported to Android Common Kernel 5.15 via: + * https://android-review.googlesource.com/c/kernel/common/+/1958439 + * https://android-review.googlesource.com/c/kernel/common/+/1958440 + */ + +#if (defined(__ANDROID_COMMON_KERNEL__) && \ + (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && \ + (LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))) || \ + (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) +#define CFG80211_SA_QUERY_OFFLOAD_SUPPORT 1 +#endif + + #endif