From 2d546792fcb6f7c053e6f31d9ccd9711976c4ef0 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 20 Jan 2017 11:52:26 -0600 Subject: [PATCH] rtl8188eu: Fix build for kernel 4.7 and later Signed-off-by: Larry Finger --- os_dep/ioctl_cfg80211.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 5fa8adc..5fe3060 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -29,6 +29,13 @@ #include "ioctl_cfg80211.h" +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)) +#define ieee80211_band nl80211_band +#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ +#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ +#define IEEE80211_NUM_BANDS NUM_NL80211_BANDS +#endif + #define RTW_MAX_MGMT_TX_CNT (8) #define RTW_SCAN_IE_LEN_MAX 2304 @@ -1743,6 +1750,11 @@ exit: void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool aborted) { unsigned long irqL; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) + struct cfg80211_scan_info info = { + .aborted = aborted + }; +#endif spin_lock_bh(&pwdev_priv->scan_req_lock); if (pwdev_priv->scan_request != NULL) @@ -1761,7 +1773,11 @@ void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool abor } else { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) + cfg80211_scan_done(pwdev_priv->scan_request, &info); +#else cfg80211_scan_done(pwdev_priv->scan_request, aborted); +#endif } pwdev_priv->scan_request = NULL;