From e225f57f52a758e1f39bc187a5cbd82b0b216f1e Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 29 Jul 2018 18:16:48 +0200 Subject: [PATCH] Add support for kernels >= 4.7 --- include/rtw_wifi_regd.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/rtw_wifi_regd.h b/include/rtw_wifi_regd.h index f56008c..5355ff8 100644 --- a/include/rtw_wifi_regd.h +++ b/include/rtw_wifi_regd.h @@ -31,4 +31,11 @@ enum country_code_type_t { int rtw_regd_init(_adapter *padapter); void rtw_reg_notify_by_driver(_adapter *adapter); +#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 + #endif /* __RTW_WIFI_REGD_H__ */