From a29108516fab259a7c637b6dbf32af3bac2bc855 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Fri, 28 Feb 2020 12:46:22 -0800 Subject: [PATCH] qcacmn: Define VENDOR_NLA_POLICY_NESTED macro to support policy check According to new changes in kernel 5.2 version onwards, driver has to provide the policy for each NL command to be verified against while registering wiphy to the kernel. To enable support for this, define a new macro VENDOR_NLA_POLICY_NESTED taking care of the version compatibility. Change-Id: I6aec53e94c57434f8e68b936ad5422248c3fa167 CRs-Fixed: 2632081 --- os_if/linux/wlan_cfg80211.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os_if/linux/wlan_cfg80211.h b/os_if/linux/wlan_cfg80211.h index 0c344fece5..b35bb09262 100644 --- a/os_if/linux/wlan_cfg80211.h +++ b/os_if/linux/wlan_cfg80211.h @@ -63,8 +63,11 @@ #define vendor_command_policy(__policy, __maxattr) \ .policy = __policy, \ .maxattr = __maxattr +#define VENDOR_NLA_POLICY_NESTED(__policy) \ + NLA_POLICY_NESTED(__policy) #else #define vendor_command_policy(__policy, __maxattr) +#define VENDOR_NLA_POLICY_NESTED(__policy) {.type = NLA_NESTED} #endif /*End of (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) */ #if defined(NBUF_MEMORY_DEBUG) && defined(NETLINK_BUF_TRACK)