tomaspinho / rtl8821ce

Other
1.6k stars 409 forks source link

add support for linux 5.17 #267

Closed IvarWithoutBones closed 2 years ago

IvarWithoutBones commented 2 years ago

They renamed a few functions in linux 5.17 breaking the build. Tested against 5.16 and 5.17.

Closes #265.

ervinpopescu commented 2 years ago

I had some more errors besides these. The problem is I've managed to fix them, but I'm not sure I did it correctly, and now I don't have the make.log to copy here. It was complaining about these macros not getting prototyped correctly( macro "get_rtw_drv_proc" passed 1 arguments, but takes just 0 etc). I hope this is the right jargon, I'm not familiar with C.

os_dep/linux/rtw_proc.h

Before:

#ifdef CONFIG_PROC_DEBUG

struct proc_dir_entry *get_rtw_drv_proc(void);
int rtw_drv_proc_init(void);
void rtw_drv_proc_deinit(void);
struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev);
void rtw_adapter_proc_deinit(struct net_device *dev);
void rtw_adapter_proc_replace(struct net_device *dev);

#else /* !CONFIG_PROC_DEBUG */

#define get_rtw_drv_proc() NULL
#define rtw_drv_proc_init() 0
#define rtw_drv_proc_deinit()                                                  \
  do {                                                                         \
  } while (0)
#define rtw_adapter_proc_init(dev) NULL
#define rtw_adapter_proc_deinit(dev)                                           \
  do {                                                                         \
  } while (0)
#define rtw_adapter_proc_replace(dev)                                          \
  do {                                                                         \
  } while (0)

#endif /* !CONFIG_PROC_DEBUG */

After:

#ifdef CONFIG_PROC_DEBUG

struct proc_dir_entry *get_rtw_drv_proc(void);
int rtw_drv_proc_init(void);
void rtw_drv_proc_deinit(void);
struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev);
void rtw_adapter_proc_deinit(struct net_device *dev);
void rtw_adapter_proc_replace(struct net_device *dev);

#else /* !CONFIG_PROC_DEBUG */

struct proc_dir_entry *get_rtw_drv_proc(void);
int rtw_drv_proc_init(void);
void rtw_drv_proc_deinit(void);
struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev);
void rtw_adapter_proc_deinit(struct net_device *dev);
void rtw_adapter_proc_replace(struct net_device *dev);
revant commented 2 years ago

This worked for me with arch linux aur https://aur.archlinux.org/packages/rtl8821ce-dkms-git#comment-858900

tomaspinho commented 2 years ago

Thank you @IvarWithoutBones. Merging this one.

ervinpopescu commented 2 years ago

It's still not working for me... For some reason it's not picking up on the CONFIG_PROC_DEBUG. I guess I'm gonna fork this.

kelebek333 commented 2 years ago

It's still not working for me... For some reason it's not picking up on the CONFIG_PROC_DEBUG. I guess I'm gonna fork this.

Can you try that? https://github.com/kelebek333/rtl8821ce

ervinpopescu commented 2 years ago

It's still not working for me... For some reason it's not picking up on the CONFIG_PROC_DEBUG. I guess I'm gonna fork this.

Can you try that? https://github.com/kelebek333/rtl8821ce

Your fork does more or less the same as this pull, and the problem isn't with this. The patches that are here and in your fork seem to be incomplete. I've managed to get this working, hopefully it won't break in the near future, as I'm planning to upgrade my laptop with another wifi card and some other stuff. Thanks anyway!