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
This commit is contained in:
@@ -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
|
||||
|
مرجع در شماره جدید
Block a user