[Solved] error: ‘IEEE80211_BAND_2GHZ’ undeclared here (not in a function)

Environmental description

System: centos7 linux-3.10 0 kernel

Driver version: 00014996-rtl8192eu_linux_v5. 6.3. 1_34030_COEX20171113-0047.20190613.zip

Network card: Realtek rtl8192eu

Problem log

rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/include/../os_dep/linux/ioctl_cfg80211.h:414:27: error: ‘IEEE80211_BAND_2GHZ’ undeclared here (not in a function)
 #define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                           ^

Solution:

Modify IOCTL_cfg80211.h

 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
+#define IEEE80211_BAND_2GHZ 0 //add by wellnw 20211213
 #define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
 #define NL80211_BAND_5GHZ IEEE80211_BAND_5GHZ
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))

Read More: