From b4270e8aa41ef9e7d568b4ae087037cefcc0a8cd Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Thu, 17 Aug 2017 17:22:34 -0700 Subject: [PATCH] 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 --- src/os_if_nan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os_if_nan.c b/src/os_if_nan.c index 7820c83cd8c4..1f2269a2c400 100644 --- a/src/os_if_nan.c +++ b/src/os_if_nan.c @@ -564,8 +564,8 @@ int os_if_nan_process_ndp_cmd(struct wlan_objmgr_psoc *psoc, struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX + 1]; char *iface_name; - if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX, - data, data_len, vendor_attr_policy)) { + if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX, + data, data_len, vendor_attr_policy)) { cfg80211_err("Invalid NDP vendor command attributes"); return -EINVAL; }