brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.6k stars 462 forks source link

[5.8.1 kernel=4.18] error: ‘struct cfg80211_ops’ has no member named ‘mgmt_frame_register’ #144

Closed alexisfrjp closed 3 years ago

alexisfrjp commented 3 years ago

On Centos 8 Stream using the kernel 4.18 (default's), I get lots of compilation errors:

/home/alexis/git/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9953:3: error: ‘struct cfg80211_ops’ has no member named ‘mgmt_frame_register’
  .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
   ^~~~~~~~~~~~~~~~~~~
/home/alexis/git/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9953:25: error: initialization of ‘int (*)(struct wiphy *, struct wireless_dev *, u64)’ {aka ‘int (*)(struct wiphy *, struct wireless_dev *, long long unsigned int)’} from incompatible pointer type ‘void (*)(struct wiphy *, struct wireless_dev *, u16,  bool)’ {aka ‘void (*)(struct wiphy *, struct wireless_dev *, short unsigned int,  _Bool)’} [-Werror=incompatible-pointer-types]
  .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

image

alexisfrjp commented 3 years ago

RHEL/Centos/Rocky Linux has a different structure, I'll fix the code to make it work with these distributions.