qcacmn: Add wrapper for nla_parse()
The Linux kernel version 4.12 introduced an API change to nla_parse(). Add conditional compilation to call nla_parse with the correct parameters based on the version of the linux kernel being compiled against. Change-Id: Ie904d217a42a2396f8245251a9c90a15dac2c0c9 CRs-Fixed: 2093354
This commit is contained in:
@@ -64,6 +64,26 @@
|
||||
.doit = NULL \
|
||||
},
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||
static inline int wlan_cfg80211_nla_parse(struct nlattr **tb,
|
||||
int maxtype,
|
||||
const struct nlattr *head,
|
||||
int len,
|
||||
const struct nla_policy *policy)
|
||||
{
|
||||
return nla_parse(tb, maxtype, head, len, policy);
|
||||
}
|
||||
#else
|
||||
static inline int wlan_cfg80211_nla_parse(struct nlattr **tb,
|
||||
int maxtype,
|
||||
const struct nlattr *head,
|
||||
int len,
|
||||
const struct nla_policy *policy)
|
||||
{
|
||||
return nla_parse(tb, maxtype, head, len, policy, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
|
||||
static inline int
|
||||
wlan_cfg80211_nla_put_u64(struct sk_buff *skb, int attrtype, u64 value)
|
||||
|
Reference in New Issue
Block a user