Add support for kernels >= 4.7.

This conditionally redefines 'enum ieee80211_band' and 'IEEE80211_NUM_BANDS'
with the pre-processor based on kernel version. Thanks to yorkedork for
providing the patch.
References: https://github.com/Grawp/rtl8812au_rtl8821au/pull/19
This commit is contained in:
Diederik de Haas 2016-06-24 19:06:15 +02:00 committed by astsam
parent cf7aa86c38
commit 7cd3949722

View File

@ -22,4 +22,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__ */