qcacmn: Add wrapper API wlan_cfg80211_nla_strscpy
From 5.11 kernel, nla_strlcpy() is renamed to nla_strscpy() since it works more like strscpy() than strlcpy() after the enhancement. Hence handle it accordingly in WLAN driver by creating wrapper API wlan_cfg80211_nla_strscpy(). Change-Id: I4c5ca1738048605c842c827d1706353bc012fed8 CRs-fixed: 3060060
This commit is contained in:

committed by
Madan Koyyalamudi

orang tua
6c387e6f24
melakukan
9579188f04
@@ -454,4 +454,18 @@ wlan_cfg80211_nla_put_u64(struct sk_buff *skb, int attrtype, u64 value)
|
||||
return nla_put_u64_64bit(skb, attrtype, value, NL80211_ATTR_PAD);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
|
||||
static inline ssize_t
|
||||
wlan_cfg80211_nla_strscpy(char *dst, const struct nlattr *nla, size_t dstsize)
|
||||
{
|
||||
return nla_strlcpy(dst, nla, dstsize);
|
||||
}
|
||||
#else
|
||||
static inline ssize_t
|
||||
wlan_cfg80211_nla_strscpy(char *dst, const struct nlattr *nla, size_t dstsize)
|
||||
{
|
||||
return nla_strscpy(dst, nla, dstsize);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user