rtl8188eu
rtl8188eu copied to clipboard
Compilation error for kernel version less than 5.8.0
My kernel version is:
linux/version.h : 328192 = 5.2.0
When I try to compile the module I get this error:
rtl8188eu/os_dep/ioctl_cfg80211.c:4423:6: error: 'upd' undeclared
In the source code of ioctl_cfg80211.c I found that we use the variable upd (ioctl_cfg80211.c:4423) even if the definition of cfg80211_rtw_mgmt_frame_register didn't include this parameter in case our kernel version is less than KERNEL_VERSION(5, 8, 0)
I suggest this patch:
diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c
index 6ea8adf..fe231f2 100644
--- a/os_dep/ioctl_cfg80211.c
+++ b/os_dep/ioctl_cfg80211.c
@@ -4417,13 +4417,15 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
{
struct adapter *adapter = wiphy_to_adapter(wiphy);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
- u16 frame_type;
+ u16 frame_type = 0;
bool reg = false;
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
if (upd->global_stypes < 11)
frame_type = (u16)BIT(upd->global_stypes << 4);
else
frame_type = 0;
+#endif
#ifdef CONFIG_DEBUG_CFG80211
DBG_88E(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
frame_type, reg);
Regards