From 54771c7c6d9cb111dcf74f2651b773a415297596 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Mon, 25 Sep 2017 10:34:21 -0700 Subject: [PATCH] qcacmn: Throw error if nla_parse is used directly In order to support multiple nla_parse function signatures across different kernel versions, a new wlan_cfg80211_nla_parse wrapper was introduced. However, it is easy for propagations or new code to reintroduce nla_parse. Redefine nla_parse to throw an error, to prevent the function from being reintroduced into the code base. Change-Id: I3015d1b3f25a1469632401899555a6260ba2dfc1 CRs-Fixed: 2116051 --- os_if/linux/wlan_cfg80211.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os_if/linux/wlan_cfg80211.h b/os_if/linux/wlan_cfg80211.h index 49d788c9a7d1..0082a93de2b5 100644 --- a/os_if/linux/wlan_cfg80211.h +++ b/os_if/linux/wlan_cfg80211.h @@ -64,6 +64,7 @@ .doit = NULL \ }, +#undef nla_parse #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) static inline int wlan_cfg80211_nla_parse(struct nlattr **tb, int maxtype, @@ -83,6 +84,7 @@ static inline int wlan_cfg80211_nla_parse(struct nlattr **tb, return nla_parse(tb, maxtype, head, len, policy, NULL); } #endif +#define nla_parse(...) (obsolete, use wlan_cfg80211_nla_parse or hdd_nla_parse) #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)) static inline int