소스 검색

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
Alan Chen 5 년 전
부모
커밋
a29108516f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      os_if/linux/wlan_cfg80211.h

+ 3 - 0
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)