From 702b8503f6759e0c7a73cbf84f1b4000103fc2a4 Mon Sep 17 00:00:00 2001 From: Carlos Garces Date: Sun, 14 Apr 2019 01:40:36 +0200 Subject: [PATCH] Fix compilation error on kernels < 4.1 --- os_dep/linux/rtw_cfgvendor.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/os_dep/linux/rtw_cfgvendor.c b/os_dep/linux/rtw_cfgvendor.c index 2b677ff..5f1c234 100644 --- a/os_dep/linux/rtw_cfgvendor.c +++ b/os_dep/linux/rtw_cfgvendor.c @@ -45,9 +45,11 @@ struct sk_buff *dbg_rtw_cfg80211_vendor_event_alloc(struct wiphy *wiphy, struct { struct sk_buff *skb; unsigned int truesize = 0; - +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)) + skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, gfp); +#else skb = cfg80211_vendor_event_alloc(wiphy, wdev, len, event_id, gfp); - +#endif if (skb) truesize = skb->truesize; @@ -140,9 +142,11 @@ struct sk_buff *rtw_cfg80211_vendor_event_alloc( struct wiphy *wiphy, struct wireless_dev *wdev, int len, int event_id, gfp_t gfp) { struct sk_buff *skb; - +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)) + skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, gfp); +#else skb = cfg80211_vendor_event_alloc(wiphy, wdev, len, event_id, gfp); - +#endif return skb; }