qcacmn: Define vendor_command_policy 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 taking care of the version
compatibility.

Change-Id: I0bf7153d1889e5b31c07d6bf4c7a95f5e72dd93c
CRs-Fixed: 2632019
这个提交包含在:
Rajeev Kumar
2020-02-28 11:07:06 -08:00
提交者 nshrivas
父节点 a2d35b81ac
当前提交 b112466b8d

查看文件

@@ -58,6 +58,15 @@
#define osif_nofl_debug(params...) \
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_OS_IF, params)
/* For kernel version >= 5.2, driver needs to provide policy */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0))
#define vendor_command_policy(__policy, __maxattr) \
.policy = __policy, \
.maxattr = __maxattr
#else
#define vendor_command_policy(__policy, __maxattr)
#endif /*End of (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) */
#if defined(NBUF_MEMORY_DEBUG) && defined(NETLINK_BUF_TRACK)
#define wlan_cfg80211_vendor_free_skb(skb) \
qdf_nbuf_free(skb)