diff --git a/os_if/linux/wlan_cfg80211.h b/os_if/linux/wlan_cfg80211.h index 129e7262d6..3b7ca280cf 100644 --- a/os_if/linux/wlan_cfg80211.h +++ b/os_if/linux/wlan_cfg80211.h @@ -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